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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.