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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

CALCULATETABLE Function error

I am using the following expression to poulate a measure:-

 

TestMeasure = 
CALCULATETABLE(
'Table',
'Table'Field <> BLANK()
) 

 

Which is returniong the following error: -

 

    The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

Isn't the whole point of CALCULATETABLE that it returns a table rather than a scalar value? Im very confused by this, any assistance would be greatly appreciated.

 

Im hoping to create the table so that I can then select the max value from a column within it. 

 

Is there another way I can approach this? 

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

CALCULATETABLE returns a table but then you are passing this whole table into a measure, which expects a scalar value. How about using MAX('table'[column])? 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

CALCULATETABLE returns a table but then you are passing this whole table into a measure, which expects a scalar value. How about using MAX('table'[column])? 

Anonymous
Not applicable

The problem was that I was trying to stuff a table into a scalar variable. 

 

I fyou need the solution to the main issue please check https://community.powerbi.com/t5/Desktop/SELECT-MAX-Date-FROM-Source-WHERE-Reference-Column-IS-NOT-N...

 

Thanks

Anonymous
Not applicable

@Anonymous thanks for the reply.

 

I had assumed as much (I'm quite new to PowerBI but I have a strong T-SQL background). 

 

I am simply trying to select the maximum Date (ColA) from Table1 where ColB is not null. Im I going about this the wrong way? 

 

I used you solution in my first itteration but it does not allow for the NULL filter.

 

Thanks 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.