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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
VoskaNova
Frequent Visitor

Count on a measure?

Hello,

Having the hardest time trying to figure out a solution for this.  My customer wants a count of the number of people meeting a metric.

 

I have the data currently in a matrix like:

Matrix.PNG

The rows are employee with supervisor drill up

 

The columns are year, qtr, month

 

The TtlClosure is coming from my data set (read as non calculated).

 

As you can see i made a measure for metric count:

MetricCount = 
    if(AVERAGEX(
                     DISTINCT(SELECTCOLUMNS('Closures&SettlementsFinal', "Claims Examiner", 'Closures&SettlementsFinal'[Claims Examiners], "TTlClosures", 'Closures&SettlementsFinal'[TtlClosure])), [TTlClosures]) >=18, 1, 0) 

And this seems to give me if its meeting the metric or not at an employee level.

 

However what is requested is a card on the page saying how many of the employees are meeting this metric.

I can easily do this as a preaggregate in sql and bring it in but the challenge is they want to be able to use a slider on month and see the number meeting metrics as the avg is recalculated over the slider time periods.  This tells me i need a measure but i can't figure out how to essentially.. count or SUM the above measure?

 

Thanks,

 

 

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

@VoskaNova,

 

Have you solved your issue by now? If you have, could you please help mark the correct answer to finish the thread? Your contribution will be much appreciated.

 

Regards,

Jimmy Tao

Still have not found a solution to this.  The problem is the data coming in needs to be at a claim level.  Goals are shown at examiner level though so many claims per examiner.  The measure for if they are meeting the goal has to be a measure then so it can scale up and down over month/quarter/year.  

 

You would then need something like a measure calculating if the measure meets the goal or not but then you need to somehow group this by examiner and sum.

 

But you can't seem to group by in power bi like this.

v-yuta-msft
Community Support
Community Support

@VoskaNova,

 

You can convert the measure MetricCount into a calculate column and then create a measure like pattern below:

 

Result =
CALCULATE (
    SUM ( 'Closures&SettlementsFinal'[MetricCount] ),
    ALLSELECTED ( 'Closures&SettlementsFinal' )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Zubair_Muhammad
Community Champion
Community Champion

@VoskaNova

 

Give this a try

 

Measure =
COUNTROWS ( FILTER ( VALUES ( TableName[Employees] ), [MetricCount] > 0 ) )

Regards
Zubair

Please try my custom visuals

Oh man, thank you for this answer. I've this problem for a long time and you help me today.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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