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
H_insight
Helper V
Helper V

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

Hi,

 

 I have a small model of two tables, connected by the "Date" Column. Sample Table1

H_insight_1-1657222903099.png

 

When I add a "Date" filter to the page (i.e. to show last week), the rows with no "Total Sales" data disappear (which is normal). But I am trying to see what each individual has done, even if it was nothing/null/0/blank.

 

Thought of removing the filter on the calendar table, but still, no data is showing and got the error of "A table of multiple values was supplied where a single value was expected."

 

Total Sales 2 = CALCULATE([Total Sales], FILTER('Calendar', ALL('Calendar'[Date])))

 

 

Expected outcome:

H_insight_2-1657223297830.png

any idea?

Sample File.

 

Thanks

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @H_insight ,

 

According to the syntax of Filter function, the second parameter should be a Boolean expression that is to be evaluated for each row of the table but not a table. For All function, it will return all the rows of the table and it couldn’t be used as the second parameter of Filter.

FILTER function (DAX) - DAX | Microsoft Docs

ALL function (DAX) - DAX | Microsoft Docs

 

You may try this Measure.

Total Sales 2 = CALCULATE([Total Sales],ALL('Calendar'[Date]))

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please provide a new download lind of your sample pbix file for we couldn’t download it with the existing link. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi @H_insight ,

 

According to the syntax of Filter function, the second parameter should be a Boolean expression that is to be evaluated for each row of the table but not a table. For All function, it will return all the rows of the table and it couldn’t be used as the second parameter of Filter.

FILTER function (DAX) - DAX | Microsoft Docs

ALL function (DAX) - DAX | Microsoft Docs

 

You may try this Measure.

Total Sales 2 = CALCULATE([Total Sales],ALL('Calendar'[Date]))

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please provide a new download lind of your sample pbix file for we couldn’t download it with the existing link. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Greg_Deckler
Community Champion
Community Champion

@H_insight Try:

 

Total Sales 2 = 
VAR __Total = CALCULATE([Total Sales], FILTER('Calendar', ALL('Calendar'[Date])))
RETURN
IF(__Total <> BLANK(), __Total, 0)

Or, more succinctly:

Total Sales 2 = CALCULATE([Total Sales], FILTER('Calendar', ALL('Calendar'[Date]))) + 0

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  You are super Fast!

however, I am getting the same error:

H_insight_0-1657223873612.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.