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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Blake753
Helper II
Helper II

Count Measure that is Based off of Other Measures

I am caculating productivity % and I am trying to build a measure to count them based on certain bins (i.e. how many people have a productivity 80-89%, 90-99% and so on).  My Productivity measure is : 

[Target Hours Sum]/([Worked Hours Sum]-[Other Productive Hours Sum]
 
Other Measures that make up that Measure (all names are column names, no measures within measures here):
Target Hours Sum: 
SUMX(
SUMMARIZE(
Query1,
Query1[Emp_Name],
Query1[Pay_Period_End],
Query1[TARGETHOURSPAYPERIOD]
),
Query1[TARGETHOURSPAYPERIOD]
)
Worked Hours Sum: 
SUMX(
SUMMARIZE(
Query1,
Query1[Emp_Name],
Query1[Pay_Period_End],
Query1[WORKEDHOURSPAYPERIOD]
),
Query1[WORKEDHOURSPAYPERIOD]
)
Other Productive Hours Sum: 
SUMX(
SUMMARIZE(
Query1,
Query1[Emp_Name],
Query1[Pay_Period_End],
Query1[OTHERPRODUCTIVEHRSPAYPERIOD]
),
Query1[OTHERPRODUCTIVEHRSPAYPERIOD]
)
 
What is the best way to go about counting these?
3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Blake753 This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Can you relate that to my specific issue in any way?  I'm not quite following what you are saying.  Ideally I'm just looking for a "if productivity value is >=0.8 and <0.9 then count how many entries there are", but I'm not sure at all how to do that.

@Blake753 I can be more specific but I would need to see sample data and expected output.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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