Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey there,
I've run into this issue a number of times and I'm hoping someone can just help explain what Power BI is doing that results in this "A table of multiple values was supplied where a single value was expected" error. It doesn't make sense to me but I probably just don't understand what is going on behind the scenes, so to speak, and if I knew what Power BI was trying to do it could help me not only avoid this error but improve my reports.
For this particular example of running into this error, as part of a formula for a measure I have this variable:
var OutputGoal = if(DATESBETWEEN('Date'[Calendar Date],date(2019,6,1),date(2019,6,8)),values(TMD[SeniorGoal]),values(TMD[ExecGoal]))
6-7 | 6-8 | 6-9 | 6-10 | |
Employee 1 | 3 | 3 | 3.25 | 3.25 |
Employee 2 | 3 | 3 | 3.25 | 3.25 |
Employee 3 | 3 | 3 | 3.25 | 3.25 |
Employee 4 | 3 | 3 | 3.25 | 3.25 |
Employee 5 | 3 | 3 | 3.25 | 3.25 |
This particular variable is what is causing the error. If I only use values(TMD[Senior Goal]) or the Exec Goal column, then my matrix visual has no issues and functions perfectly. Adding in the logic operator is what makes everything fail. Maybe this is just me assuming it will do something akin to Excel and just evaluate the criteria and spit out the one value when Power BI is really doing something else. I just don't understand what the error really means and haven't been able to find a good explanation anywhere else.
Solved! Go to Solution.
Note the Return values of DATESBETWEEN and use SELECTEDVALUE instead of VALUES.
Note the Return values of DATESBETWEEN and use SELECTEDVALUE instead of VALUES.
User | Count |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |