We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hi guys,
My ex-collegue had made a report and included a dax measure in it.
The report was always working until today. The visuals stopped working and the measure gave an error: A table of multiple values was supplied where a single value was expected.
The measure is:
Solved! Go to Solution.
Hi Amit,
Thanks for your reply!
I think the problem is my dataset.
What will be the best way to share my pbix with you?
Hi @Anonymous ,
till now the DAX you have provided was returning a single value per row because the Filter() function was true for only one row. Maybe now after the data was refreshed, you are getting multiple rows that satisfy the Filter() condition and hence you are getting a multiple values which is the error.
I think this is the problem. How can I Fix this?
Hi:
Sometime you need to add a function(as first part of measure) like COUNTROWS or some other aggregation as it looks like a whole table of values is trying to fit into a scalar solution.
Try adding COUNTROWS( then what your measure says.
Hope that helps.
I've tried countrows but it still doesnt work...
@Anonymous , This is a new column, as per screenshot and code. And should work as a new column in table FactActualHoursBillability
This seems correct
EmployeeKey =
CALCULATE(
DISTINCT('DimEmployee'[EmployeeKey]),
FILTER('DimEmployee',
'FactActualHoursBillability'[TT_EMP_ID] = 'DimEmployee'[EmployeeId] &&
'FactActualHoursBillability'[TT_DATE] >= 'DimEmployee'[RowEffectiveDate] &&
'FactActualHoursBillability'[TT_DATE] <= 'DimEmployee'[RowExpirationDate]
)
)
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hi Amit,
Thanks for your reply!
I think the problem is my dataset.
What will be the best way to share my pbix with you?
User | Count |
---|---|
13 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
28 | |
19 | |
13 | |
11 | |
7 |