Forum Discussion
Top 20 Percentage
- 4 years ago
Hi Anonymous ,
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
- lbendlin4 years ago
Super User
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