Forum Discussion
TriveniN
Helper II
3 years agoA table multiple values was supplied where single value was expected.
Getting an issue when I include below measure in drill through report. Error details : A table multiple values was supplied where single value was expected. Days_In_Period_% = -- Current ...
johnt75
Super User
3 years agoI think the problem is probably in _SS_AvgOcc_Name_. VALUES returns a table but your code is expecting it to only have 1 row. My guess is that multiple rows are being returned. You could check by changing the measure to return COUNTROWS(_SS_AvgOcc_Name_).
- TriveniN3 years ago
Helper II
Thanks for your response
But, I need to compare values that are comming from _SS_AvgOcc_Name_ to Lease_SFV[Name] while calculating below one
VAR _SSDIP =IF( SELECTEDVALUE(ReportPeriod[Type])="Month" &&VALUES(LEASE_SFV[Name 1]) IN {_SS_AvgOcc_Name_},DATEDIFF(CALCULATE(STARTOFMONTH(Datecalendar[TheDate])), _dateM+1,DAY),IF(SELECTEDVALUE(ReportPeriod[Type])="Quarter" &&VALUES(LEASE_SFV[Name 1]) IN {_SS_AvgOcc_Name_},DATEDIFF(CALCULATE(STARTOFQUARTER(Datecalendar[TheDate])), _dateQ+1, DAY)) )Can you guide me how we can achive
- johnt753 years ago
Super User
You could try
- change CALCULATE( VALUES( to CALCULATETABLE(VALUES
- remove the {} from around the variable when you're doing the IN check
- in the final SWITCH statement, change the check for <> BLANK to NOT( ISEMPTY( _SS_AvgOcc_Name ) )