Forum Discussion
Syndicate_Admin
2 years agoAdministrator
TopN Problems Same result
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: Top10 = C...
- 2 years ago
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 ) ) )
jdbuchanan71
2 years agoSuper User
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 )
)
)- Syndicate_Admin2 years agoAdministrator
Indeed this is the solution, thank you very much.