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
wildmight2017
Advocate II
Advocate II

DAX - calculating sum of condition based on calculated measures (screen and pbix included)

Good afternoon, I decided to try to get assistance, been stuck on this for a little bit of time already:

 

Summary: I'm trying achieve the following measure calculation - pseudologic (sum of expression  - IF ([Calc Measure 1]>[Calc Measure 2], 1, 0) - I'd need to be able to display this measure independently in other calculations. On  the screen below, I'd like to be able to derive measure which would display 5 (count of Employees having individual Performance % higher than Perofranc ein Service Region %) in other visuals (such as KPI, card).

 

So far, I've faced 2 issues: a) not being able to filter TRUE/FALSE expression b) circular. I'd also like to have a DAX-formula scalar solution, rather than changing tables/data model.  

 

Formula for Performance % measure:

Performance % = DIVIDE(SUM('Fact Jobs'[JobsCompleted]), SUM('Fact Jobs'[JobsTargeted]),0 ) 

 

Formula for Performance by Service Region measure :

 

Performance by Service Region % = CALCULATE ([Performance %],SUMMARIZE ('Dim Employee', 'Dim Employee'[service_region]), ALL('Dim Employee'[Name]))

 

Screenshot:

screen.png

 

 

Thank you for your help! 

Link to PBIX: Issue PBIX

1 ACCEPTED SOLUTION

What worked was    Count of filtered rows = COUNTROWS (FILTER(tablename), [FILTER column]=1) 

View solution in original post

2 REPLIES 2
wildmight2017
Advocate II
Advocate II

Should I try to caculate a "physical" table and then use  it to get those measures? 

What worked was    Count of filtered rows = COUNTROWS (FILTER(tablename), [FILTER column]=1) 

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.