Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago
Solved

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...
  • jdbuchanan71's avatar
    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 )
        )
    )