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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dax measure stopped working

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:

EmployeeKey =
CALCULATE(
DISTINCT('DimEmployee'[EmployeeKey]),
FILTER('DimEmployee',
'FactActualHoursBillability'[TT_EMP_ID] = 'DimEmployee'[EmployeeId] &&
'FactActualHoursBillability'[TT_DATE] >= 'DimEmployee'[RowEffectiveDate] &&
'FactActualHoursBillability'[TT_DATE] <= 'DimEmployee'[RowExpirationDate]
)
)

The measure should return a number as value and the data type is: Whole number. I've tried to change it to decimal numbers but it still doesn't work.

Can someone help me solve this puzzle? 

klchan06_0-1646734292947.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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?

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

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.

Anonymous
Not applicable

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.

Anonymous
Not applicable

I've tried countrows but it still doesnt work...

amitchandak
Super User
Super User

@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.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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