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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
ANKITBISANI
Advocate I
Advocate I

Dynamically Changing X Axis with respect to the Slicer Value Selected

WhatsApp Image 2017-09-15 at 12.47.01 PM (1).jpegWhatsApp Image 2017-09-15 at 12.47.01 PM.jpegHi Experts,

 

I have Date Dimension with attributes DateID,Date,Month,Quarter,Year.

Fact table: DateID,SalesValue.

 

My report has 4 slicers: Year. Quarter, Month, Day.

I want to plot bar graph for SalesValue Vs Time Component (May be Year ,QTR anything)

 

Time component would be dynamic .

Meaning :

 

When I select 2017 from Year slicer ,my bar graph on x-axis should show up 4 Quarters for 2017 Vs SalesValue.

Similarly, When I select Quarter the x-axis should dynamically switch to months of those quarter.

Any help or workaround would be appreciated.

 

Attached Image shown the scenario . As year is selected from slicer ,it shows Quarter and with quarter , it shows up month.

 

Also , we are referring the below link but the issue seems to be differnt .Here I need to select a value from slicer wheras below link only shows about the attribute from the slicer I select .Ex Year ,Month

 

https://community.powerbi.com/t5/Desktop/Dynamic-change-in-X-Axis/m-p/87174#M36525

 

Thanks

 

 

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @ANKITBISANI

 

Here is one way you can do it.  I have created a simple PBIX file that you can download to see how it it works

 

https://1drv.ms/u/s!AtDlC2rep7a-n1mIeiBbW3A4gMmL

 

View report online

 

I might write this up in a blog post tomorrow and update this post with a link

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark,

I also got the same issue.Thanks for your post.

 

The pbix uploaded by you has Data table at Day, Month,Quarter and Year level. And date dimension has only one column.

What if I have only DayID in fact table.How to get then dynamic measure on month,year and quarter level?
Or Is it necessary to have Day,Month,Quarter,Year in the fact table to use USERRELATIONSHIP for calculation.

Is there any workaround if I have only DayID and MyValue in fact table?

 

Thanks  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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