Forum Discussion
floralau
4 years agoNew Member
Top N error: The expression refers to multiple columns.
Hi all, I am new to power bi and faced some difficulties. What's wrong with my following code? measure = TOPN( 3, 'Succesful Rate', 'Succesful Rate'[Channel],0 ) The error messa...
- 4 years ago
Hi floralau
Download example PBIX file with the following code
TOPN returns a table which is why you are getting the error about 'multiple columns'. I guess you are trying to create a measure, but a measure must be a single value, it can't hold a table.
To count the number of different strings use this measure
Number of Diff Strings = DISTINCTCOUNT('Successful Rate'[Channel])Regards
Phil
PhilipTreacy
Super User
4 years agoHi floralau
Download example PBIX file with the following code
TOPN returns a table which is why you are getting the error about 'multiple columns'. I guess you are trying to create a measure, but a measure must be a single value, it can't hold a table.
To count the number of different strings use this measure
Number of Diff Strings = DISTINCTCOUNT('Successful Rate'[Channel])
Regards
Phil
- floralau4 years agoNew Member
Thanks so much for your help!