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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mwmchugh215
Frequent Visitor

Dynamic X Axis based on date slicer

I have a stacked column chart where the x axis is a list of dates. I also have a slicer for that same value that filters the other visuals based on that date. Is there a way to set the x axis of the stacked column chart to show only dates on or before the selected date of the slicer? I figure I could create a measure that filters for all values on or before the selcted value but I'm not able to use a measure as an x axis.

2 REPLIES 2
mwmchugh215
Frequent Visitor

@amitchandak thank you for the response. The only problem I am having in implementing this solution is I have two date fields in my table and the independent date table has an active relationship with the other date field that is used as a slicer for other visuals in the report. Is there a solution where both date fields can be active, a second independent date table or something else?

amitchandak
Super User
Super User

@mwmchugh215 , for that the slicer needs to be on an independent date table

 


//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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