Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Top 5 in a month

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 t...
  • Anonymous's avatar
    Anonymous
    3 years ago

    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