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

Help with DAX - Counting outcome of a measure

I'm trying to create a measure which counts whether a customer contributed to the top 80% of the revenue. 

 

At the moment I have the following data: 

rank  |  debtor   |    Revenue    |     Revenue cumulative   |  % of total revenue   |   < 80%

1         a                       350                        350                           54%                              1

2         b                       300                        650                           100%                            0

Total                            650             

 

 

Less then 80% is a measure created by using the switch function

< 80% = CALCULATE(SWITCH(TRUE(),
[% of total revenue] <=0.8 && [% of total revenue]>0, 1,BLANK()))
 
In a card i would like to show the total of customers contributed to 80% of the revenue (so how many times the outcome of the switch function is equal to 1).
 
Thanks in advance for your help! 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

please try this:

 

Amount = SUMX ( VALUES ( 'TableName'[debtor]), [< 80%])

 

BR
Timo

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous 

 

just add a card with the Measure "< 80%".

 

Or understand you wrong?!

 

BR
Timo

 

Edit: You are able to select the SUM for the Measure "<80%"

Sum Card.PNG

Anonymous
Not applicable

Hi @Anonymous , 

 

Unfortenately thats not working. A card will show me the value 1, as it will ignore all the different debors and shows me the sum of all the revenues divided by the cumulative revenue. The outcome will be 100%, so the card will show me the value 1. 

Anonymous
Not applicable

Hi @Anonymous ,

 

I try to reproduce your report/data. Are "Revenue cumulative" and  "% of total revenue" custom columns or custom measures or are they part of the import?

Do you import a file or is it a direct query?

 

BR
Timo  

Anonymous
Not applicable

Hi @Anonymous , 

 

these are all custom measures. I don't use import, i'm working with Direct Query!

 

Kind Regards,

Annabel 

Anonymous
Not applicable

Hi @Anonymous ,

 

please try this:

 

Amount = SUMX ( VALUES ( 'TableName'[debtor]), [< 80%])

 

BR
Timo

Anonymous
Not applicable

@Anonymous Works perfect!!! Thanks!! 🙂 

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.