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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anton93
Frequent Visitor

Dynamically shifting the dates (X Axis) based on user selection in a Slider

Hi, 

 

Considering I have a database with a column "Actual date" (X axis) to be plotted with my "P Capacity" (Y Axis) and another column "Actitivty" (Legend), it is easy and straightforward to select a Stacked Column Chart. 

Anton93_0-1689600362404.png

 

 

Now I need to introduce a functionality where the user can select by how many days they want to shift the "Actual date" by using a slider and this should be added to the "Actual Dates" and then plotted. 

Ex: Assuming the user selects 15 on the slider, the new values will be plotted from the 16th of January: 

Anton93_1-1689600494323.png

 

Unfortunately I am unable to create a link between the slider and the X axis. What I have been able to try is: 

 

1. Introduce a new column that can add "X" number of days to the actual. Plot this new column as the X axis, so that when I manually change the value X in the formula, it works. 

 

Formula: 

NewDateColumn = DATEADD(Tabelle1[Actual date].[Date],"X",DAY)    (Where I replace "X" with value I want like 15) 
 
But I would want this value X to be taken from the slider! 
 
I did try using Measures, but they can't be used as an axis. 
 
Any suggestions?

 

 

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anton93 ,

Firstly we can't create a dynamic column, in other words, we can't use a dynamic measure in a calculated column.

According to your description "Assuming the user selects 15 on the slider, the new values will be plotted from the 16th of January", if you mean the visual will be filtered to 16 to 31, here's my solution.

Create a measure:

 

Measure =
IF ( MAX ( 'Table'[Actual date] ) > 'Parameter'[Parameter Value], 1, 0 )

 

Put the measure in visual filter and select show items when the value is 1.

vyanjiangmsft_1-1689753783154.png

After apply filter, get the result:

vyanjiangmsft_2-1689753926932.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

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

2 REPLIES 2
Jidnyasa2904
Helper I
Helper I

Hello Anton93, 

 

If you have found the solution to your question above, could you please share it? 
I have a similar query, I want to present a comparison of sales TY and LY on a Line Chart. But the event dates are off my one week. The date shift slicer would work perfect, similar as yours. 

v-yanjiang-msft
Community Support
Community Support

Hi @Anton93 ,

Firstly we can't create a dynamic column, in other words, we can't use a dynamic measure in a calculated column.

According to your description "Assuming the user selects 15 on the slider, the new values will be plotted from the 16th of January", if you mean the visual will be filtered to 16 to 31, here's my solution.

Create a measure:

 

Measure =
IF ( MAX ( 'Table'[Actual date] ) > 'Parameter'[Parameter Value], 1, 0 )

 

Put the measure in visual filter and select show items when the value is 1.

vyanjiangmsft_1-1689753783154.png

After apply filter, get the result:

vyanjiangmsft_2-1689753926932.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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