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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ValeriaBreve
Post Partisan
Post Partisan

Need to ignore dates in chart via measure

Hello,

I have a measure that is supposed to render the max value from a calculation. It works as such, but as soon as I put it in a chart with a few columns from the Date_Table, it gets sliced accordingly even though I have removed the filtering in DAX.
There is a relationship between Date_Table[Date] 1--> * 'Experimental Sample Req'[Created]

Can somebody put me in the right path on how to have the measure return the same value (max) everywhere? I am at a loss. Thanks!
Kind regards
Valeria

VAR SamplesTable =
SUMMARIZECOLUMNS(
'Experimental Sample Req'[Id],
FILTER(
'Experimental Sample Req',
'Experimental Sample Req'[Status] = "COMPLETED"
),

"Date Created", MAX( 'Experimental Sample Req'[Created] ),
"Ready for Scheduling Date",
MAX(
'Experimental Sample Req'[Ready_for_Scheduling_Set_Date]
),
"Created to Ready to Schedule",
DATEDIFF(
MAX( 'Experimental Sample Req'[Created] ),
MAX(
'Experimental Sample Req'[Ready_for_Scheduling_Set_Date]
),
DAY
),
"Production Date",
MAX( 'Experimental Sample Req'[Production_Date] ),
"Ready to Schedule to Production",
DATEDIFF(
MAX(
'Experimental Sample Req'[Ready_for_Scheduling_Set_Date]
),
MAX( 'Experimental Sample Req'[Production_Date] ),
DAY
),
"First Goods Issue",
MAX( 'Experimental Sample Req Volume'[Goods_Issue_Date] ),
"Production to Goods Issue",
DATEDIFF(
MAX( 'Experimental Sample Req'[Production_Date] ),
MAX( 'Experimental Sample Req'[Goods_Issue_Date] ),
DAY
),
"Status", MAX( 'Experimental Sample Req'[Status] )
)
RETURN
{
CALCULATE(
MAXX( SamplesTable, [Ready to Schedule to Production] ),
ALL( 'Experimental Sample Req' ),
REMOVEFILTERS( Date_Table ),
ALL(Date_Table),
CROSSFILTER( Date_Table[Date], 'Experimental Sample Req'[Created], None )
)
}

1 ACCEPTED SOLUTION
wardy912
Memorable Member
Memorable Member

Hi @ValeriaBreve 

 

The relationship between the date table and 'experimental sample req' needs to be ignored in the measure, ALL inside the FILTER ensures no other filters affect the data.

 

Max_ReadyToScheduleToProduction :=
VAR SamplesTable =
    SUMMARIZE(
        FILTER(
            ALL('Experimental Sample Req'),
            'Experimental Sample Req'[Status] = "COMPLETED"
        ),
        'Experimental Sample Req'[Id],
        "ReadyToScheduleToProduction", 
            DATEDIFF(
                MAX('Experimental Sample Req'[Ready_for_Scheduling_Set_Date]),
                MAX('Experimental Sample Req'[Production_Date]),
                DAY
            )
    )
RETURN
    MAXX(SamplesTable, [ReadyToScheduleToProduction])

 

If this helps please give a thumbs up, thanks!

View solution in original post

2 REPLIES 2
ValeriaBreve
Post Partisan
Post Partisan

@wardy912 Thank you!!!!

wardy912
Memorable Member
Memorable Member

Hi @ValeriaBreve 

 

The relationship between the date table and 'experimental sample req' needs to be ignored in the measure, ALL inside the FILTER ensures no other filters affect the data.

 

Max_ReadyToScheduleToProduction :=
VAR SamplesTable =
    SUMMARIZE(
        FILTER(
            ALL('Experimental Sample Req'),
            'Experimental Sample Req'[Status] = "COMPLETED"
        ),
        'Experimental Sample Req'[Id],
        "ReadyToScheduleToProduction", 
            DATEDIFF(
                MAX('Experimental Sample Req'[Ready_for_Scheduling_Set_Date]),
                MAX('Experimental Sample Req'[Production_Date]),
                DAY
            )
    )
RETURN
    MAXX(SamplesTable, [ReadyToScheduleToProduction])

 

If this helps please give a thumbs up, thanks!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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