cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashaykohad
Helper I
Helper I

Need to change Month Values to Year Values in X axis

I have 2 tables
Table 1 : vehicledata
vehicle_number          invoice amount         date

Tabel 2 : calendardate

 

date        month      year      quarter       fyquarter       monthnumber

I have created one slicer for the year from calenderdate.

My query is when no slicer year selected (means all years data), I need chart axis as year wise.

and if any one year is selected in slicer, i need chart axis as month wise.

 

1 ACCEPTED SOLUTION
elofstrom
Resolver II
Resolver II

AFAIK this it not currently supported in the product.

One possible way to solve this would be to use buttons for the years instead of a slicer.

Then create two visuals - one with year on the axis and one with month.

Then create multiple bookmarks - one that only shows the year chart and others that only show the monthly chart filtered to the particular years and use actions to simulate what you're trying to achieve.

Granted this isn't very scalable as you'd have to keep adding buttons every year but it's the only way I know to implement what you want in Power BI.

You can do what you want in paginated reports if you have access to Premium.

View solution in original post

2 REPLIES 2
elofstrom
Resolver II
Resolver II

AFAIK this it not currently supported in the product.

One possible way to solve this would be to use buttons for the years instead of a slicer.

Then create two visuals - one with year on the axis and one with month.

Then create multiple bookmarks - one that only shows the year chart and others that only show the monthly chart filtered to the particular years and use actions to simulate what you're trying to achieve.

Granted this isn't very scalable as you'd have to keep adding buttons every year but it's the only way I know to implement what you want in Power BI.

You can do what you want in paginated reports if you have access to Premium.

Noorani
Helper II
Helper II

Hi,

 

You need to create calculated columns for Year and Month.

- I hope it helps. 

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors