The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
9 | |
7 |