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 all!
Completing a finance report where i have a list of top 20 clients and the totals - but now i want to see how it compares t to the full table so in this case - what percentage of net revenue comes from top 20 clients,
HELP
What you see here is the totals row of the top 20
Solved! Go to Solution.
Hi @chrisdavila ,
I created the sample data.
Then use these measures to calculate top n values.
RankClients =
RANKX (
ALLSELECTED ( 'Table'[clients] ),
CALCULATE ( SUM ( 'Table'[amount] ) ),
,
DESC,
SKIP
)
Top N Percentage =
VAR N = 3
VAR totalamount =
SUMX ( ALL ( 'Table' ), 'Table'[amount] )
VAR TopNTotal =
CALCULATE (
SUM ( 'Table'[amount] ),
FILTER ( ALLSELECTED ( 'Table'[clients] ), [RankClients] <= N )
)
RETURN
DIVIDE ( TopNTotal, totalamount )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @chrisdavila ,
I created the sample data.
Then use these measures to calculate top n values.
RankClients =
RANKX (
ALLSELECTED ( 'Table'[clients] ),
CALCULATE ( SUM ( 'Table'[amount] ) ),
,
DESC,
SKIP
)
Top N Percentage =
VAR N = 3
VAR totalamount =
SUMX ( ALL ( 'Table' ), 'Table'[amount] )
VAR TopNTotal =
CALCULATE (
SUM ( 'Table'[amount] ),
FILTER ( ALLSELECTED ( 'Table'[clients] ), [RankClients] <= N )
)
RETURN
DIVIDE ( TopNTotal, totalamount )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is standard DAX filter modification. What have you tried so far and where are you stuck?
havent tried any yet so please some guidence
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
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 |
---|---|
112 | |
97 | |
83 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |