Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I am making a dashboard with open data on Bullying in Peru and I want to make a top 10 of the subtypes of violence, it should be noted that they are string data, and use this dax:
Solved! Go to Solution.
The TOPN is changing the fitler context to override the line, try it with a KEEPFILTERS.
Top10 =
CALCULATE (
[Subtypes],
KEEPFILTERS (
TOPN ( 10, ALL ( 'DM Facts'[SUBTIPO_VIOLENCIA] ), [Subtypes], DESC )
)
)
Hi,
Share the download link of the PBI file.
I didn't know I had to share the download link.
The TOPN is changing the fitler context to override the line, try it with a KEEPFILTERS.
Top10 =
CALCULATE (
[Subtypes],
KEEPFILTERS (
TOPN ( 10, ALL ( 'DM Facts'[SUBTIPO_VIOLENCIA] ), [Subtypes], DESC )
)
)
Indeed this is the solution, thank you very much.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |