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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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