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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
ShivaPrasad1
Helper I
Helper I

Control of Axis is not working as per the filters

Hello Team,

 

I have two visuals one is having column values(mostly 4 distinct values) as axis where as other is having time as axis. I have filter of time. As per the filter visual 2 is slicing where as visual 1 is not at all showing the data. Here I am attaching screenshots and measure expressions of the same. Please provide some approach to work the filter selection for visual 1 as well. In both visuals Y axis value is same and X axis is different. Both should be sliced accrording to slicer selection. Expected output for visual 1 is shown in first image which is showing completly blank now.

Note: Slicer selection is meant for dynamic rollback to previous 12 months.

Selected_Date = if(ISFILTERED(slicerTable[year]),if(ISFILTERED(slicerTable[month]),SELECTEDVALUE(slicerTable[Date])))

Sales_Default =
VAR SelectedDate = MAX(slicerTable[Date])
VAR CurrentDate = SELECTEDVALUE(Source[DATE])
RETURN IF(CurrentDate <= SelectedDate &&
CurrentDate > EOMONTH(SelectedDate,-12),
SUM(Source[SALES]), BLANK())

Sales_Selected =
VAR SelectedDate = [Selected_Date]
VAR CurrentDate = SELECTEDVALUE(Source[DATE])
RETURN IF(CurrentDate <= SelectedDate &&
CurrentDate > EOMONTH(SelectedDate,-12),
SUM(Source[SALES]))

Sales_Final = if(ISFILTERED(slicerTable[year])&&ISFILTERED(slicerTable[month]),[Sales_Selected],[Sales_Default])



1.PNG

 

2.PNGslicer.PNG

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @ShivaPrasad1

 

It seems you may try to create a calendar table and link it with your data table. You may refer to below post for reference.

 

https://community.powerbi.com/t5/Desktop/Show-last-13-months-based-on-user-single-slicer-selection/t...

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.