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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ArchStanton
Post Prodigy
Post Prodigy

A table of multiple values was supplied where a single value was expected.

Hi,

 

I've seen other posts about this error message but I'm unsure how to rectify it?

 

I'm trying to find out what Team an individual was in at a particular time.

 

ArchStanton_0-1661935954741.png

 

Team at Position = CALCULATE (
    VALUES ( 'Team Association History'[team.name] ),
    FILTER (
        'Team Association History',
        'Cases'[ownerid] = 'Team Association History'[cr769_systemuser]
             && 'Cases'[Data Set Range] >= 'Team Association History'[Start Date]
            && 'Cases'[Data Set Range] <= 'Team Association History'[Calculated End]))

 

Any ideas anyone?

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ArchStanton , You can not use values, try max, concatenatex

 

Team at Position = CALCULATE (
max ( 'Team Association History'[team.name] ),
FILTER (
'Team Association History',
'Cases'[ownerid] = 'Team Association History'[cr769_systemuser]
&& 'Cases'[Data Set Range] >= 'Team Association History'[Start Date]
&& 'Cases'[Data Set Range] <= 'Team Association History'[Calculated End]))

 

or


Team at Position = CALCULATE (
concatenateX ('Team Association History', 'Team Association History'[team.name], ", " ),
FILTER (
'Team Association History',
'Cases'[ownerid] = 'Team Association History'[cr769_systemuser]
&& 'Cases'[Data Set Range] >= 'Team Association History'[Start Date]
&& 'Cases'[Data Set Range] <= 'Team Association History'[Calculated End]))

 

 

View solution in original post

4 REPLIES 4
EmaVasileva
Helper V
Helper V

Hi @ArchStanton ,

The error message is usually caused by 'VALUES' function, because VALUES returns all existing values in the filter context, but measures can only input a single value. When the measure returns more than one value, it gets this error. 

In case of multiple values, you need to aggregate the values. You can use MAX/MIN/SUM/AVERAGE/FIRSTNONBLANK/LASNONBLANK/CONCATENATEX

If I can,I will try to make some tests later.

Good luck,
Ema


Thank you, Max instead of Values has worked, I just need to check if the results are correct

amitchandak
Super User
Super User

@ArchStanton , You can not use values, try max, concatenatex

 

Team at Position = CALCULATE (
max ( 'Team Association History'[team.name] ),
FILTER (
'Team Association History',
'Cases'[ownerid] = 'Team Association History'[cr769_systemuser]
&& 'Cases'[Data Set Range] >= 'Team Association History'[Start Date]
&& 'Cases'[Data Set Range] <= 'Team Association History'[Calculated End]))

 

or


Team at Position = CALCULATE (
concatenateX ('Team Association History', 'Team Association History'[team.name], ", " ),
FILTER (
'Team Association History',
'Cases'[ownerid] = 'Team Association History'[cr769_systemuser]
&& 'Cases'[Data Set Range] >= 'Team Association History'[Start Date]
&& 'Cases'[Data Set Range] <= 'Team Association History'[Calculated End]))

 

 

Many thanks - both options work although the latter brings back multiple positions for some people so I'll stick with MAX for now, I will need to check to see if the results are correct.

 

Grateful for your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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