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
Applicable88
Impactful Individual
Impactful Individual

Difference of a naked column in a calculated column or filter() of a measure

Hello,

 

Measure 1 =
calculate([TotalSales]),
Filter(
ALL('Calendar'[Date]),
'Calendar'[Date]<= MAX('Calendar'[Date])
))
in this Measure 1 above I need to wrap up Calendar[Date] within a aggregation like MAX and somehow it finds the filter context to calendar date. It is actually inside the filter of a interator. If I just write [CalendarDate] I get only the total sum in every row.
 
But writing the same as a naked colum in a calculated column, which by itself is already an row by row iterator I get right values:
Column= 
Var _TableVariable= Filter( 'Calendar', 'Calendar' [Date]>'Maintable'[BookingDate] && 'Calendar[Day]= "Monday"))
return
countrows(_TableVariable) 
 
Here I don't need any aggregator I can just write naked column and when computing every row it knows which date and values to fill in. But in the Measure it's also in a row to row context via Filter-Function, why here I cannot use naked column?
 
Thank you very much in advance.
 
Best. 
 
2 REPLIES 2
amitchandak
Super User
Super User

@Applicable88 , You are returning a table from filter. just like measure column can only have one value per row.

So calculation should be done assuming each row operation happens. here you are returning a table for each row

 

example

if( 'Calendar' [Date]>minx(relatedtable('Maintable') , 'Maintable'[BookingDate]) && 'Calendar[Day]= "Monday",1,0)

 

assuming Maintable is joined with calendar

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

@amitchandak I understand what you mean. But I'm referring to the Filter function, which you can see in the measure and also in the calculated column. In the measure 'Calendar'[Date] only works with MAX('Calendar'[Date])  whereas in the calculated column in works with a naked column like 'Calendar'[Date]>= 'Booking'[Date] 

I assume you have row by row also in the measure through Filter(), so why cannot write                'Calendar'[Date]<= 'Calendar'[Date] instead? Don't we have row context here ? Why we need to aggregate? It's a virtual table within the measure in my understanding, same as filter() in a calculated column.

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.