Forum Discussion
TOPN function doesn't allow me to quote a table
Hi Anonymous
As tested, it works on my side.
Measure = CALCULATE(SUM([value]),TOPN(5,Table1,[value]))
or
Measure = CALCULATE(SUM([value]),TOPN(5,'Table1',[value])) or Measure = CALCULATE(SUM([value]),TOPN(5,ALL(Table1),[value]))
Please share a simple data for me to test.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the prompt feedback. I suspect the issue may relate to my computer language setup or power bi version. Is there a way for me the send you the data and topn function as an attachment rather than a printscreen?
- v-juanli-msft7 years agoCommunity Support
Hi Anonymous
My pbix
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Anonymous7 years agoNot applicable
Here is the URL to the pbix sampel file.
I just tried inputting the same measure on a colleagues's power query module (in Excel), which seems to work. I wouldn't like to know why it doesn't work with my power bi desktop.
Thanks!
- Anonymous7 years agoNot applicable
Hi, just to let you know that I have installed the latest power bi desktop and open your file from there, I got the same error message with your function.