Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Top Month

find top month based on count of other value ..
Eg:august has 5k records sept has 10k records..
How to show sept in card visual !!??

  • Hi Anonymous,

     

    Please share a dummy sample. You also can modify the measure below to achieve your goal.

    top1 =
    MAXX (
        TOPN (
            1,
            SUMMARIZE (
                'FactSales',
                DimDate[YearMonth],
                "AmountOfRecords", COUNTROWS ( FactSales )
            ),
            [AmountOfRecords], DESC
        ),
        [YearMonth]
    )
    

    Top-Month

     

    Best Regards,
    Dale

4 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous,

     

    Please share a dummy sample. You also can modify the measure below to achieve your goal.

    top1 =
    MAXX (
        TOPN (
            1,
            SUMMARIZE (
                'FactSales',
                DimDate[YearMonth],
                "AmountOfRecords", COUNTROWS ( FactSales )
            ),
            [AmountOfRecords], DESC
        ),
        [YearMonth]
    )
    

    Top-Month

     

    Best Regards,
    Dale

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous,

     

    Could you please mark the proper answers as solutions?

     

    Best Regards,

    Dale

    • Anonymous's avatar
      Anonymous
      Not applicable

      using direct topn under visual card  is also the best way...think so!!