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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rveerasamy
Helper III
Helper III

when applying filter should not affect dax measure

Hi Experts,
 
I'm searching for solution that when applying filter it should not affect dax.
 
Days To Fulfill =
VAR childorderdate =CALCULATE(
    MAXX(CALCULATETABLE('PBI_BBA_SALES',FILTER('PBI_BBA_SALES',NOT ISBLANK('PBI_BBA_SALES'[Ref Id]) ) ),PBI_BBA_SALES[Order Date])
)
Return DATEDIFF(MAX('PBI_BBA_SALES'[Order Date]),childorderdate,DAY)
 
 
this is the measure I have created but when I add filter to the table it should not affect the dax
this is the solution I need
1 REPLY 1
tamerj1
Super User
Super User

Hi @rveerasamy 

please clarify what do you mean by "when I add filter to the table it should not affect the dax"

Also both CALCULATE and CALCULATETABLE are doing nothing in this case. Can simply write 

Days To Fulfill =
VAR childorderdate =
MAXX (
FILTER ( 'PBI_BBA_SALES', NOT ISBLANK ( 'PBI_BBA_SALES'[Ref Id] ) ),
PBI_BBA_SALES[Order Date]
)
RETURN
DATEDIFF ( MAX ( 'PBI_BBA_SALES'[Order Date] ), childorderdate, DAY )

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.