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

Change the x-axis dynamically

Hello everyone, 

 

I have a slicer for "Period Selection" (Yearly, Quarterly, Monthly, Weekly and Daily).

 

The x-axis on my charts need to change as per the selection made from the slicer as follows:

Yearly -> display Month/Year e.g. Oct 2016, Nov 2016, etc. up to the current month Jun 2016

Quarterly -> display Quarter/Year e.g. Q1 2017, Q2 2017, etc.

Monthly -> same as for Yearly

Weekly -> display Month/Year/Week e.g. May 2017 W1, May 2017 W2, etc.

Daily -> display all dates in the current month e.g. 2017-06-01, 2017-06-02, etc.

 

I have all those dates in my Date Dimension.

 

How do I create the Axis Dimension to reflect the above slicer selection please?

 

Thanks in advance.

 

Kind regards,

Yogesh

1 ACCEPTED SOLUTION

Hi @Yogesh_NMH,

 

Here is an other similar thread which has provided a valid solution to dynamically show X-axis dimension.

 

Dynamic change in X Axis

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
vanessafvg
Super User I
Super User I

@Yogesh_NMH why dont you create a hierarchy?

 

https://powerbi.microsoft.com/en-us/guided-learning/powerbi-learning-3-11g-visual-hierarchies-drilli...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@vanessafvg For some charts, I will, don't worry. The problem is, I need to reflect this Axis Dimension in several charts & KPI's as well. 

 

I am also using the custom visual found here. So when the user selects Yearly, Quarterly, Monthly, etc, the Trend Axis in the KPI Indicator needs to also change accordingly.

 

Any idea on how to do this?

 

Thanks in advance.

 

Kind regards,

Yogesh

@Yogesh_NMH please post screen shots it really hard to visualise what you saying without providing examples and then also of what you actually wanting it to look like





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@vanessafvg

 

The column chart below uses a Date Hierarchy which enables the user to drill down Year->Quarter->Month->Week->Day. 

 

Date Hierarchy Chart with Drill Down.png

 

However, for the KPI's below, you need to specify a Trend Axis. 

 

KPI Indicator with Trend Axis.png

By default I have used the column MonthInCalendar. However, this axis needs to be dynamic. In simple english:

Trend Axis =

IF Yearly OR Monthly THEN MonthInCalendar

ELSE IF Quarterly THEN QuarterInCalendar 

ELSE IF Daily THEN DateInCalendar

ELSE MonthInCalendar (default)

@Yogesh_NMH never personally done it before but think these 2 links can help

 

http://www.leanx.eu/tutorials/dynamic-dimensions-in-power-bi

https://gqbi.wordpress.com/2017/01/24/power-bi-how-to-filter-slicers-dynamically/

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@vanessafvg I was looking at those 2 solutions some minutes ago Smiley Happy

Hi @Yogesh_NMH,

 

Here is an other similar thread which has provided a valid solution to dynamically show X-axis dimension.

 

Dynamic change in X Axis

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @v-yulgu-msft

 

Many thanks for your reply. I will give it a try.

 

Kind regards,

Yogesh

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.