Forum Discussion
Error - multiple values was supplied where a single value
- 5 years ago
As you cannot use MAX or MIN function with text to force unicity for that columns, you can use FIRSTNONBLANK or LASTNONBLANK functions, only if the vendor name is not somenthing crucial in your report. Is a workaround we often use in Sql queries, when details are not important.
You can check this post from community for reference https://community.powerbi.com/t5/Community-Blog/LASTNONBLANK-amp-FIRSTNONBLANK-How-To-Use-This-Two-DAX-Function/ba-p/1403721#:~:text=These%20two%20functions%20are%20pretty,FIRSTNONBLANK%20returns%20the%20first%20value.
Is important to know that the values for each column will be first or last (depends on the function used) sorted in alphabetical order,
As you cannot use MAX or MIN function with text to force unicity for that columns, you can use FIRSTNONBLANK or LASTNONBLANK functions, only if the vendor name is not somenthing crucial in your report. Is a workaround we often use in Sql queries, when details are not important.
You can check this post from community for reference https://community.powerbi.com/t5/Community-Blog/LASTNONBLANK-amp-FIRSTNONBLANK-How-To-Use-This-Two-DAX-Function/ba-p/1403721#:~:text=These%20two%20functions%20are%20pretty,FIRSTNONBLANK%20returns%20the%20first%20value.
Is important to know that the values for each column will be first or last (depends on the function used) sorted in alphabetical order,