Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bdmichael09
Helper II
Helper II

Measure results in Table of multiple values error

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]))
 
What I'm trying to get this particular line to do is for any employee, if the date is 6-1 to 6-8, I want to spit out what the production goal is for a senior level employee in that role and after that date I want to spit out the executive level production goal. For example, one role that I am looking at has a senior goal of 3 units and an executive goal of 3.25. My expectation is that Power BI should be evaluating the criteria included in the matrix and then spitting out something like this:
 
 6-76-86-96-10
Employee 1333.253.25
Employee 2333.253.25
Employee 3333.253.25
Employee 4333.253.25
Employee 5333.253.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. 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@bdmichael09 

 

Note the Return values of DATESBETWEEN and use SELECTEDVALUE instead of VALUES.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@bdmichael09 

 

Note the Return values of DATESBETWEEN and use SELECTEDVALUE instead of VALUES.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.