Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Sum of a measure

Hi,

 

I have data of a production line and calculate the average station time. So I add a measure to calculate it.

 

StationAverage (Measure)
1015
2013
3014
3516
4018
5016
5515

 

Now I want to count the amount of stations where the time is above 15. Therefore I add another measure.

 

Measure 2 = IF([Average] > 90, 1, 0)

 

So I get this.

 

StationAverage (Measure)Measure 2
10150
20130
30140
35161
40181
50161
55150
Total1071

 

Now I want to create a third measure to build the SUM of the Measure2.

But it doesnt' work. Do someone has an idea to create this measure?

 

I am a little bit confused because the Total of Measure2 is 1 and not 3...

 

FYI: I use direct query!! So it isn't possible to add a column!

 

Best regards

Timo

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Try following

 

Measure 2 =
SUMX ( VALUES ( TableName[Station] ), IF ( [Average] > 90, 1, 0 ) )

Regards
Zubair

Please try my custom visuals

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Try following

 

Measure 2 =
SUMX ( VALUES ( TableName[Station] ), IF ( [Average] > 90, 1, 0 ) )

Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.