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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Rolling timelines past AND future

Hello,

 

I would like to create a bar chart using 12 rolling months as the X-axis timeline. This is easy with relative date filters for either last 12 months or next 12 months. However, I'd like to show 6 past months AND 6 future months on the same graph. Is there a way or workaround how to do this?

 

 

2 ACCEPTED SOLUTIONS
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to show TODAY() on the bar chart as the basis for judgment, showing the values of the past 6 months and the next 6 months. Right?

Here are the steps you can follow:

(1)This is  my test data:

vyueyunzhmsft_0-1663306687516.png

 

(2)We can click “New measure” to create a measure  used to override the Y axis:  “value”

value = CALCULATE( SUM('Table'[test]) , 'Table'[Date] < EOMONTH( TODAY() ,6)+1 && 'Table'[Date] >EOMONTH(TODAY(),-7)+1)

 

(3)We can put the [Date] in X axis of the bar chart (Keep the year and month) and we put the [value] measure in the Y axis:

vyueyunzhmsft_1-1663306687525.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

Anonymous
Not applicable

Ok, 

looks like this would work. However it looks quite complicated as I'd need to create new measures for each and every field I want to show on this 6+6 month time frame.

 

This give me an idea though. I could probably add a calculated true/false column in my date table telling if the date is in the desired range. Then I could use this new field as a filter on all the visuals.

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to show TODAY() on the bar chart as the basis for judgment, showing the values of the past 6 months and the next 6 months. Right?

Here are the steps you can follow:

(1)This is  my test data:

vyueyunzhmsft_0-1663306687516.png

 

(2)We can click “New measure” to create a measure  used to override the Y axis:  “value”

value = CALCULATE( SUM('Table'[test]) , 'Table'[Date] < EOMONTH( TODAY() ,6)+1 && 'Table'[Date] >EOMONTH(TODAY(),-7)+1)

 

(3)We can put the [Date] in X axis of the bar chart (Keep the year and month) and we put the [value] measure in the Y axis:

vyueyunzhmsft_1-1663306687525.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

Anonymous
Not applicable

Ok, 

looks like this would work. However it looks quite complicated as I'd need to create new measures for each and every field I want to show on this 6+6 month time frame.

 

This give me an idea though. I could probably add a calculated true/false column in my date table telling if the date is in the desired range. Then I could use this new field as a filter on all the visuals.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.