Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi all
Think I might have gotten a bit rusty!
I need to show a table with months in the columns with the top 5 accounts in each. It could be, that the same account shows up twice since it is in the top 5 for more than one month.
This works well with a column with only one month, RANKX() does the job. But when I use it combination with multiple months, I cannot filter for TOPN in the Matrix visual.
See picture below what the end result should look like:
Anybody have an idea how to achieve this?
Tried a calculated table as well... but might be overkill?
Thanks for the help!
Solved! Go to Solution.
Hi @Anonymous ,
Do you mean that the top 5 accounts in mid-October will not appear in mid-November. Re-sort them?
Or the account that appeared in mid-October will also appear in the follow-up:
Measure =
var _rank=
RANKX(
FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))),
CALCULATE(SUM('Table'[Amount])),,DESC)
return
IF(
_rank <=5,MAX('Table'[Amount]) ,BLANK())
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous thank you! that worked like a charm
Hi @Anonymous ,
Do you mean that the top 5 accounts in mid-October will not appear in mid-November. Re-sort them?
Or the account that appeared in mid-October will also appear in the follow-up:
Measure =
var _rank=
RANKX(
FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))),
CALCULATE(SUM('Table'[Amount])),,DESC)
return
IF(
_rank <=5,MAX('Table'[Amount]) ,BLANK())
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 70 | |
| 39 | |
| 35 | |
| 23 |