Forum Discussion

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    ngocnguyen Try:

    Table 3 = 
        VAR __Table = SUMMARIZE('Top2',[CAT],"__Amt",SUM('Top2'[Amt]))
        VAR __Table1 = ADDCOLUMNS(__Table,"__Rank",RANKX(__Table,[__Amt]))
        VAR __Categories = DISTINCT(SELECTCOLUMNS(FILTER(__Table1,[__Rank]<3),"__CAT",[CAT]))
    RETURN
        FILTER('Top2',[CAT] IN __Categories)
    • ngocnguyen's avatar
      ngocnguyen
      Helper IV

      Greg_Deckler 

      Many thanks for your support.

      However, Top 2 table is the Output, but in your Dax formular, you calling the Top 2 table?, 

      It 's a litte bit confusing. Could you please check again?

    • ngocnguyen's avatar
      ngocnguyen
      Helper IV

      Hi CNENFRNL 

      Highly appreciate your support. 

      is there any way to get the Output as below?
      Logic: get top 2 Amt by both CAT & Route