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.
Hi,
I'm having challenge with counting the number of rows, when a New Measure is over a certain limit.
e.g. I have a table with multiple transactions for multiple people in terms of Amounts Deposited and Withdrawn like follows:
Name | Amount Deposited | Amount Withdrawn |
James | 0 | 78 |
Max | 100 | 0 |
Struss | 0 | 56 |
Phil | 12 | 0 |
James | 0 | 32 |
Max | 34 | 0 |
Struss | 0 | 45 |
Phil | 57 | 0 |
James | 34 | 0 |
Max | 0 | 85 |
Struss | 22 | 0 |
Phil | 0 | 22 |
James | 33 | 0 |
Max | 0 | 34 |
Struss | 88 | 0 |
Phil | 0 | 44 |
I have created a 'New Measure' in Power BI Report, to give me the 'percentage of Amount Withdrawn/Amount Deposited' for each "Name". I have been able to succesfully do that.
Now I want to Count IF this new measure, 'percentage of Amount Withdrawn/Amount Deposited', is over 100%. And have one of the Visuals such as 'Card' show that on the power BI report. My report in production has over a 100k rows with over 10k unique users.
What formula, DAX query can I use to create this new Measure? or some other workaround.
Cheers,
Nikhil
@batranikhil , Please refer these measures
% Withdrawn = Divide(Sum(Table[Amount Withdrawn]), Sum(Table[Amount Deposited]))
% GT 100 = countx(Values(Table[Name]), if([% Withdrawn] >1 , [Name], blank() ) )
Thanks Amit - worked beautifully.
Can you also help with what to use if I were to build a pie chart depicting 5 groups:
above 200%, 100-200%, 76-100%, 50-75%, and less than 50%.
Any direction would help.
Cheers,
Nikhil
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |