Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

top 15

hi i want to flag the top 15 account  i have thos table  dim date, dim payer and fact transaction  dim date conact to fact transaction with date to date transaction  i want to create a flag...
  • Greg_Deckler's avatar
    Greg_Deckler
    5 years ago

    Anonymous In that case, can you paste sample data or provide a link to the PBIX? Guessing otherwise but you might want:

    Top_15_Customers_Measure =
      VAR __AccountName = MAX([Account_Name])
      VAR __Table = SUMMARIZE(ALL('dimPayer'),[Account_Name],"__fees",[All fees])
      VAR __Top15 = SELECTCOLUMNS(TOPN(15,__Table,[__fees],DESC),"Account_Name",[Account_Name])
    RETURN
      IF(__AccountName IN __Top15,1,0)