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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Error of Expression Refers to multiple columns. Multiple columns cannot be converted to scalar value

Can some one please comment on what is causing the error in the below DAX Power BI formula. I am trying to get the maximum/count of a numberic field which is sort of index calculated column based on 2 column grouping.

 

CALCULATE(COUNTROWS('Company Detail' ),FILTER(All('Company Detail'),Filter('Company Detail', Earlier('Company Detail'[Company_RecID])='Company Detail'[Company_RecID] )))

 

 

Count Manage Seats = CALCULATE(COUNT('Company Detail'[Company Date Order] ),FILTER(All('Company Detail'),Filter('Company Detail', Earlier('Company Detail'[Company_RecID])='Company Detail'[Company_RecID] )))
3 REPLIES 3
Anonymous
Not applicable

If you read https://dax.guide/filter/ carefully, you'll notice that the second argument to FILTER must be a boolean expression...
Anonymous
Not applicable

  • Hi may I know if anyone have resolutions to this . Thanks in advance 
Anonymous
Not applicable

Thanks,

I tweaked the DAX formula a bit to the below, however the count is not evaluating as expected. If you see the below picture it shows as 19 but it should evaluate to 10 as per the first column readingAny clues what is wrong ? 

Count Manage Seats = CALCULATE(DISTINCTCOUNTNOBLANK('Company Detail'[Company Date Order] ),FILTER(All('Company Detail'),CountRows(Filter('Company Detail', Earlier('Company Detail'[Company_RecID])='Company Detail'[Company_RecID] ))))
 
 

image.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors