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
Anonymous
Not applicable

Convoluted Dax Counter

I have a situation where I have to create a variety of different counters. 

 

I need counters that does this:

1) For every MP, count Location 1.

2) For every MP, count Location 2.

3) For [Location 1] check to see if [MP] is blank or not, if [MP] is not blank check to see if [Group] is not blank, count every [Location 1] in group. 

4) Same thing for Location 2.

 

Really need help with this here is a graphic of a sample dataset. Thank you

 

Sample.png

1 REPLY 1
ntaylo06
Resolver II
Resolver II

1) MP and L1 Counter = CALCULATE(COUNTA('Table'[Location 1]), NOTBLANK('Table'[MP]) + 0

2) MP and L2 Counter = CALCULATE(COUNTA('Table'[Location 2]), NOTBLANK('Table'[MP]) + 0

3) MP Group and L1 Counter = CALCULATE(COUNTA('Table'[Location 1]), NOTBLANK('Table'[MP], NOTBLANK('Table'[Group]) + 0

3) MP Group and L2 Counter = CALCULATE(COUNTA('Table'[Location 2]), NOTBLANK('Table'[MP], NOTBLANK('Table'[Group]) + 0

 

Let me know if I missunderstood. 

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.