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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamic X Axis based against Time

Hi All,

 

I have a requirement to show Gross Earned Premiums Vs Time (YYYYMM format) for last 30 months (including last Month). The X Axis show the time YYYYMM whcih is always 30 mins. How we can make the X Axis dynamically so that it will show alwasy 30 months. 

Right now  we are in March we have data loaded till Feb for Actuals. The Graph Should display data from 201609 till 201902. Once data is available for March 2019 the X axis should shift from 201610 till 201903.

 

Thanks ,

Sidhesh 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

We can create a calualted column based on your time column like this.

 

Column = DATE(LEFT(Table1[yyyymm],4),RIGHT(Table1[yyyymm],2),01)

time.PNG

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can create a measure and make the visual filtered by the measure as the picture below.

 

Measure = var today =TODAY()
var _date = MAX('Table'[Date])
return
IF(DATEDIFF(_date,today,MONTH)<=30,1,0)

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi Frank,

 

Thanks for your reply, But I have the Time column in YYYYMM format whcih we have loaded the same in the fact table, we do not have any date column which we can use here, is it possible to here ?

 

Thanks

Hi @Anonymous ,

 

We can create a calualted column based on your time column like this.

 

Column = DATE(LEFT(Table1[yyyymm],4),RIGHT(Table1[yyyymm],2),01)

time.PNG

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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