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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Isabellii02
New Member

URGENT! Line chart where Planned ignores Month slicer but still reacts to other filters

Spoiler

 

Hello,

I’m working on a Power BI report and need to control filter behavior for a line chart called “Planning & Execution.”

Isabellii02_1-1771341655509.png

Requirement

  • The Executed line must react to all filters (including Month slicer).

  • The Planned line must ignore the Month slicer.

  • The Planned line must still react to all other filters (Year, other dimensions, etc.).

In short: Planned should ignore only the Month slicer, but respect the rest of the filter context.

The current implementation partially works, but now the visual only reacts correctly to Year and Month, and ignores other filters unexpectedly.


Model Approach

To achieve this, I created two calendar tables:

Calendar

Calendario = ADDCOLUMNS( CALENDAR(DATE(2024,1,1), DATE(2027,12,31)), "Year", YEAR([Date]), "MonthNum", MONTH([Date]), "Month", FORMAT([Date], "mmm"), "Month_Slicer", FORMAT([Date], "mmm") )

CalendarAxis

CalendarioEixo = ADDCOLUMNS( CALENDAR(DATE(2024,1,1), DATE(2027,12,31)), "Month_Slicer", FORMAT([Date], "mmm yyyy"), "YearMonthNum", YEAR([Date]) * 100 + MONTH([Date]) )

I then overlaid two line charts.

The goal of overlaying them is to control filter interaction separately.

Isabellii02_2-1771341772447.png

 


 

Visual 1 (Main Lines – Uses CalendarAxis)

X-axis:
CalendarioEixo[Month_Slicer]

Y-axis measures:

  • Accumulated Executed Final

  • Accumulated Plan Final


Supporting Measure

Last Executed Date = MAX('Process Recertification Tracker (2)'[PA Done Date])

This measure identifies the last month with execution data, preventing accumulation beyond the last executed month.


Accumulated Executed Final

This measure calculates accumulated executed records up to the current X-axis month.

 

Accumulated Executed Final = VAR MaxDateContext = MAX(CalendarioEixo[Date]) VAR SelectedYear = SELECTEDVALUE(Calendario[Year]) VAR LastExecDate = [Last Executed Date] RETURN IF( YEAR(MaxDateContext) = SelectedYear && EOMONTH(MaxDateContext, 0) <= EOMONTH(LastExecDate, 0), CALCULATE( COUNTROWS('Process Recertification Tracker (2)'), FILTER( ALL('Process Recertification Tracker (2)'), 'Process Recertification Tracker (2)'[PA Done Date] <= MaxDateContext && YEAR('Process Recertification Tracker (2)'[PA Done Date]) = SelectedYear && NOT ISBLANK('Process Recertification Tracker (2)'[PA Done Date]) ) ) )

  • Uses [PA Done Date]

  • Accumulates execution values

  • Stops accumulating after last execution month

Accumulated Plan Final

This measure calculates accumulated planned records up to the current X-axis month.

Accumulated Plan Final = VAR MaxDateContext = MAX(CalendarioEixo[Date]) VAR SelectedYear = SELECTEDVALUE(Calendario[Year]) RETURN IF( YEAR(MaxDateContext) = SelectedYear, CALCULATE( COUNTROWS('Process Recertification Tracker (2)'), FILTER( ALL('Process Recertification Tracker (2)'), 'Process Recertification Tracker (2)'[Target Date] <= MaxDateContext && YEAR('Process Recertification Tracker (2)'[Target Date]) = SelectedYear && NOT ISBLANK('Process Recertification Tracker (2)'[Target Date]) ) ) )

  • Uses [Target Date]

  • Accumulates planned values


Visual 2 (Overlay – Month Slicer Interaction Disabled)

This second visual is overlaid on top of the first one.

X-axis:
Calendario[Month_Slicer]

Y-axis measures:

  • Accumulated executed (stop)

  • Accumulated plan

Interaction with Month slicer is disabled for this visual.


Accumulated executed (stop)

Accumulated executed (stop) = VAR MaxDateContext = MAX(Calendario[Date]) VAR LastExecDate = [Last Executed Date] RETURN IF( EOMONTH(MaxDateContext,0) > EOMONTH(LastExecDate,0), BLANK(), CALCULATE( [Executed Quantity], FILTER( ALLSELECTED(Calendario), Calendario[Date] <= MaxDateContext ) ) )

This:

  • Accumulates executed quantity

  • Stops after last execution month

  • Uses ALLSELECTED over Calendario


Accumulated plan

Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALLSELECTED(Calendario), Calendario[Date] <= MAX(Calendario[Date]) ) )

This:

  • Accumulates planned quantity

  • Is intended to ignore only the Month slicer

  • Still respect other filters


Current Issue

The visual behaves inconsistently:

  • Executed reacts correctly to Month.

  • Planned correctly ignores Month.

  • However, both lines are no longer reacting properly to other filters (besides Year).

I’ve tried variations using ALL, REMOVEFILTERS, and ALLSELECTED, but removing the Month filter without breaking the rest of the filter context is proving difficult.

Month Slicer

The Month slicer is built using:

Calendario[Mes]

This slicer is intended to:

  • Filter the Executed line normally

  • Not affect the Planned line

Current Configuration

  • The slicer is connected to the Calendario table.

  • The first visual (which uses CalendarioEixo as X-axis) reacts to the slicer.

  • The second overlaid visual (which uses Calendario[Month_Slicer] on the X-axis) has its interaction with the Month slicer manually disabled.

This setup was designed to isolate filter behavior by splitting axis control across two calendar tables.


Expected Behavior of the Slicer

If I select:

  • Month = March

Then:

  • The Executed line should adjust and display values only up to March.

  • The Planned line should remain unchanged (ignoring the Month slicer).

  • Both lines should still respect all other filters (Year, Region, Commodity, etc.).


Question

What is the correct DAX pattern to:

  • Remove only the Month slicer filter

  • Preserve all other filter context

  • Avoid breaking cross-filtering from other dimensions

If needed, I can provide a simplified PBIX model.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Isabellii02 , This should work. Make sure Calendar table is marked as date table and any field/column in filter/visual should come from date table only 
Both will work 
Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALLSELECTED(Calendario), Calendario[Date] <= MAX(Calendario[Date]) ) )

or

Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALL(Calendario), Calendario[Date] <= MAX(Calendario[Date]) ) )

 

other options are 


Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALL(Calendario[Date]), Calendario[Date] <= MAX(Calendario[Date]) ) ,REMOVEFILTERS(Calendario[Month]))

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

View solution in original post

3 REPLIES 3
v-priyankata
Community Support
Community Support

Hi @Isabellii02 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@amitchandak Thanks for the inputs.

I hope the information provided by user was helpful. If you still have questions, please don't hesitate to reach out to the community.

 

Hi @Isabellii02 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.

 

amitchandak
Super User
Super User

@Isabellii02 , This should work. Make sure Calendar table is marked as date table and any field/column in filter/visual should come from date table only 
Both will work 
Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALLSELECTED(Calendario), Calendario[Date] <= MAX(Calendario[Date]) ) )

or

Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALL(Calendario), Calendario[Date] <= MAX(Calendario[Date]) ) )

 

other options are 


Accumulated plan = CALCULATE( [Planned Quantity (Fixed)], FILTER( ALL(Calendario[Date]), Calendario[Date] <= MAX(Calendario[Date]) ) ,REMOVEFILTERS(Calendario[Month]))

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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