Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Calculating an index from true/false data - SUM.IF formula

$
0
0

Hi 

 

I'm used to apply SUM.IF in Exel but I don't know how do the same via a Measure in Power BI. 

 

I will illustrate my problem by an example. Let's say I have this data: 

 

Sales opportunity, unique#Sales prizeRevenueIs the car blue?Is the car a 4WDDoes the car have backseats?
1110025TrueFalseTrue
1230040FalseFalseFalse
1325035FalseFalseFalse
1417520FalseTrueFalse
1510020FalseFalseFalse
167510TrueFalseTrue
1737555TrueTrueTrue

 

If I want to calculate and index that tells my what the average revenue is on all sales, I use this formula to create a Measure: Rev_average = (SUM (Data[Revenue]))/(COUNTROWS(Data)) * 100 

 

My problem is that I also want to calculate revenue based on the entries where and only if one of the following values is true: “Is the car blue?”, “Is the car a 4WD”, ”Does the car have backseats?”  So if all values is false it will not count in the average revenue.

 

Does anyone know how to do that?

 

BR

Anders


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>