0

I'm trying to get the top 5 revenues from the column REVENUE in the Table SALES . I have tried this but it's not correct because the expression is suppose to return multiple columns .

TOP_N_REV = TOPN(5;FACT_SALES; MAX(FACT_SALES[REVENUE]) ; 0 )

Any ideas ?

Thank you

Robin
  • 1
  • 2

1 Answers1

0

You're missing the SUMX

TOP_N_REV = SUMX(TOPN(5;ALL(FACT_SALES);FACT_SALES[REVENUE]);FACT_SALES[REVENUE])

Also might be related: http://www.dutchdatadude.com/power-bi-pro-tip-confusion-about-topn-versus-rankx/

Ondrej Svejdar
  • 21,349
  • 5
  • 54
  • 89
  • Thank you for your reply . I have tried that but it's not giving me the result that I seek . still showing me all the revenues in a specific date. – Robin May 31 '17 at 07:51