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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
ASuhaji
Frequent Visitor

Column chart: Parameter to X-axis with date hierarchy

Hello Everyone,

 

I need your help with the following.

 

I want to create a dynamic slicer similar to the one shown in this video.

 

My problem is that one of the fields is a date column with date hierarchy. Currently, this is the related DAX code:

X-Axis = {
    ("Date", NAMEOF('Data'[Date])), 0),
    ("Supervisor", NAMEOF('Data'[Supervisor]), 1),
    ("Controller", NAMEOF('Data'[Controller]), 2)
}
 
The dynamic x-axis works perfectly with this too, the problem is that if I choose the date option, I get a breakdown by day and not the originally planned date hierarchy, where I can use the drill function.

 

Do you know of any way to solve it?

 

Thank you in advance.

2 ACCEPTED SOLUTIONS
ASuhaji
Frequent Visitor

I found a good solution for it.

 

This is how I changed the code of the parameter:

 

X-Axis = {
    ("Year", NAMEOF('Data'[Date].[Year]), 0),
    ("Quarter", NAMEOF('Data'[Date].[Quarter]), 1),
    ("Month", NAMEOF('Data'[Date].[Month]), 2),
    ("Day", NAMEOF('Data'[Date].[Day]), 3),
    ("Supervisor", NAMEOF('Data'[Supervisor]), 4),
    ("Regional Controller", NAMEOF('Data'[Controller]), 5)
}
 
After that I created 3 bookmarks which first state is the selected year, quarter, month, day fields, the second is only the supervisor, the third is the controller. Then I hid the related slicer and use only the bookmark navigator.

View solution in original post

ASuhaji
Frequent Visitor

I found a much simpler and more elegant solution:

 

X-Axis = {
    ("Year", NAMEOF('Data'[Date].[Year]), 0, "Date"),
    ("Quarter", NAMEOF('Data'[Date].[Quarter]), 1, "Date"),
    ("Month", NAMEOF('Data'[Date].[Month]), 2, "Date"),
    ("Day", NAMEOF('Data'[Date].[Day]), 3, "Date"),
    ("Supervisor", NAMEOF('Data'[Supervisor]), 4, "Supervisor"),
    ("Regional Controller", NAMEOF('Data'[Controller]), 5, "Regional Controller")
}
 
And I use the 4th column for the slicer.

View solution in original post

2 REPLIES 2
ASuhaji
Frequent Visitor

I found a much simpler and more elegant solution:

 

X-Axis = {
    ("Year", NAMEOF('Data'[Date].[Year]), 0, "Date"),
    ("Quarter", NAMEOF('Data'[Date].[Quarter]), 1, "Date"),
    ("Month", NAMEOF('Data'[Date].[Month]), 2, "Date"),
    ("Day", NAMEOF('Data'[Date].[Day]), 3, "Date"),
    ("Supervisor", NAMEOF('Data'[Supervisor]), 4, "Supervisor"),
    ("Regional Controller", NAMEOF('Data'[Controller]), 5, "Regional Controller")
}
 
And I use the 4th column for the slicer.
ASuhaji
Frequent Visitor

I found a good solution for it.

 

This is how I changed the code of the parameter:

 

X-Axis = {
    ("Year", NAMEOF('Data'[Date].[Year]), 0),
    ("Quarter", NAMEOF('Data'[Date].[Quarter]), 1),
    ("Month", NAMEOF('Data'[Date].[Month]), 2),
    ("Day", NAMEOF('Data'[Date].[Day]), 3),
    ("Supervisor", NAMEOF('Data'[Supervisor]), 4),
    ("Regional Controller", NAMEOF('Data'[Controller]), 5)
}
 
After that I created 3 bookmarks which first state is the selected year, quarter, month, day fields, the second is only the supervisor, the third is the controller. Then I hid the related slicer and use only the bookmark navigator.

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors