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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Tojo1
New Member

Why use CROSSFILTER ansd ALL when it works without them

Hello,

If I change the first measure to be like the second measure I get the exact same result.
So my question is if somebody could explain any reason for having the CROSSFILTER and ALL in the first measure.

First Measure
------------
var datum = CALCULATE(max(Dim_Calendar_ArrivalDate[Date]),
CROSSFILTER(Dim_Calendar_ArrivalDate[Dim_Calendar_SK],HistoryFact_Booking[Dim_CalendarArrivalDate_SK], None))
var caltable= CALCULATETABLE(Blocked_Units, Blocked_Units[date] = datum, ALL(Dim_Calendar_ArrivalDate[Date]) )
var sumxcal = SUMX(caltable, Blocked_Units[AntalUnitsBlockade])
sumxcal return

Second measure
--------------
var datum = CALCULATE(max(Dim_Calendar_ArrivalDate[Date]))
var caltable= CALCULATETABLE(Blocked_Units, Blocked_Units[date] = datum)
var sumxcal = SUMX(caltable, Blocked_Units[AntalUnitsBlockade])
sumxcal return

 

Many thanks in advance

Tony Johansson

0 REPLIES 0

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.