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
Joak
Frequent Visitor

Calculating a COUNT of a measure

Hello, 

 

I have to count a calculated measure which is based on this formula :

 

AVERAGEX(
	KEEPFILTERS(VALUES('Data'[MatchingKey]));
	CALCULATE(SUM('Data'[LondonOccupencyRate])
))

I aim to count how many of those measures are above 1. 

 

I tried to just add the formula "COUNT()" before this one, but it doesn't work. 

 

Also, I'd like to know wether it was possible or not to automaticcaly build a new table with lines that doesn't contains null or zero. 

 

If anybody has already been faced with this kind of issue, don't hesitate 🙂 

 

Thanks

 

1 ACCEPTED SOLUTION

@Joak,

 

With table and matrix visual, you just need to add a measure.

Measure =
IF ( SUM ( Table1[%total] ) < 0.8 && SUM ( Table1[%a] ) > 0.3, TRUE () )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Joak
Frequent Visitor

In fact I realize the problem might be more complicated than what I described. 

 

What I want to do is to sum lines that have the same matching key, and then compare it. 

 

The table look like that : 

 

MatchingKey          %a          %b          %total

ABC123                   20%

ABC123                                 23%            43%

ABC456                   15%    

ABC456                                 18%            33%

ABC789                   32%           

ABC789                                  12%            44%

 

 

And then be able to build a last column with "TRUE"

if   %total< x%

BUT %a > y%

 

 

@Joak,

 

With table and matrix visual, you just need to add a measure.

Measure =
IF ( SUM ( Table1[%total] ) < 0.8 && SUM ( Table1[%a] ) > 0.3, TRUE () )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.