Forum Discussion
DAX: TOPN Function Error
I don't know why it produces a warning. Is it because of a wrong logic or execution? Any suggestions would be great, thank you!8 Replies
- AlBCommunity Champion
Hi Anonymous
I'm not sure I understand completely what you need but I think a good option would be to create an additional calculated column in which you rank the assignees by the number of "In-Progress". Probably with RANKX
- v-piga-msftResident Rockstar
Hi Anonymous,
Have you solved your problem with the suggestion of AlB?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share some data sample and your desired output so that we could help further on it.
Best Regards,
Cherry
- AnonymousNot applicable
Hi Cherry!
I still haven't figured it out. Can you pls help me? Here is the code that I made.
I know that he suggested RANKX as a new calculated column, however I still don't get the execution I should do. This is my desired output:
With the measure I created which is seen in the first photo, I was able to filter the Assignee's and the status = "In-Progress". However, I would want to include a TOPN dax measure to get the top 5 assignees with the most number of in-progress status and display my desired output. I know that there's an option wherein you can do it using Visual Level filters:

But I would really love for everything to be created as a measure. And not use the visual level filters anymore. Please let me know if you could suggest a measure that I could use for this :) Thank you!- v-piga-msftResident Rockstar
Hi Anonymous,
Thanks for your desired output.
Please share your data sample which could reproduce your scenario so that I can copy and test on it.
Best Regards,
Cherry
- ryan_mayuSuper User
Anonymous
If you don't want to do the settings in the visualization. I think you need to create a new table.
Table= TOPN( 5, FILTER(Final, Final[Status]="In-Progress"), Final[Assignee],ASC)
I am not sure if this coding can work. You can have a try.
Thanks
- AnonymousNot applicable
Hi Ryan!
The code still doesn't work. It has an error that says, "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."