cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RanjanThammaiah
Helper V
Helper V

DAX Error: The Expression Refers to Multiple Columns. Multiple Columns Cannot Be Converted to a Scal

Hi All,

 

i am getting the error for the below formula. Kindly can some one explain me what this error referring to?

DAX Error: The Expression Refers to Multiple Columns. Multiple Columns Cannot Be Converted to a Scalar Value.

Measure 2 = CALCULATE(FILTER(SLI,SUM(SLI[TERFYTD_PR])>41666))

 

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

Hi @RanjanThammaiah ,

 

Your DAX will return a table with multi columns, it couldn't be a measure. If you want a measure, you need add your expression before filter. If you want a table, you could use CALCULATETABLE() function to create a new table.

Table 2 = 
CALCULATETABLE(FILTER('SLI',SUM('SLI'[TERFYTD_PR])>4))

To avoid misunderstandings, you could elaborate on your expected results and calculation logic.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-eachen-msft
Community Support
Community Support

Hi @RanjanThammaiah ,

 

Your DAX will return a table with multi columns, it couldn't be a measure. If you want a measure, you need add your expression before filter. If you want a table, you could use CALCULATETABLE() function to create a new table.

Table 2 = 
CALCULATETABLE(FILTER('SLI',SUM('SLI'[TERFYTD_PR])>4))

To avoid misunderstandings, you could elaborate on your expected results and calculation logic.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

amitchandak
Super User
Super User

Try like

Measure 2 = CALCULATE(countrows(FILTER(SLI,SUM(SLI[TERFYTD_PR])>41666)))

 

But what exactly you are trying to achieve, measure filter needs a context.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
ImkeF
Super User
Super User

Hi @RanjanThammaiah 

you're missing the first argument of the CALCULATE-function, which would be some sort of an aggregation. (The aggregation of the actual value/column that you want to show in the values-section of your visual)

Like so i.e.:

 

Measure 2 = CALCULATE( SUM(MyFactTable[Amount] ), FILTER(SLI,SUM(SLI[TERFYTD_PR])>41666) )

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors