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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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