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
M_SBS_6
Helper V
Helper V

In the last xxxmonths

Hi, 

 

I have a card which has sum(app_val). I have then added in to the filter app_date relative date is in the last 12 months. This shows me data from 02/02/23 to 01/02/24.

 

Any idea how to show the same relative function but for the period prior i e 02/02/22 to 01/02/23 please? 

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

Hi @M_SBS_6 ,

 

As far as I know, Relative date doesn't currently support what you want it to do.
As @amustafa replied, you can use slicer's 'between' option.
Or you can try the method below.
According to your description, here is the sample I created:

vweiyan1msft_0-1706859809996.png

Please try the following code to create Measure and do the following.

DateDiff = DATEDIFF(SELECTEDVALUE('Table'[Date]), TODAY(), MONTH)

vweiyan1msft_1-1706859849213.png

Result is as below.

vweiyan1msft_2-1706859864418.png

Thank you, @amustafa , for your helpful and quick response.

 

Best Regards,
Yulia Yan

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
v-weiyan1-msft
Community Support
Community Support

Hi @M_SBS_6 ,

 

As far as I know, Relative date doesn't currently support what you want it to do.
As @amustafa replied, you can use slicer's 'between' option.
Or you can try the method below.
According to your description, here is the sample I created:

vweiyan1msft_0-1706859809996.png

Please try the following code to create Measure and do the following.

DateDiff = DATEDIFF(SELECTEDVALUE('Table'[Date]), TODAY(), MONTH)

vweiyan1msft_1-1706859849213.png

Result is as below.

vweiyan1msft_2-1706859864418.png

Thank you, @amustafa , for your helpful and quick response.

 

Best Regards,
Yulia Yan

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

amustafa
Super User
Super User

Date slicer with relative date settings will not be abe to do what you need. Have you tried using 'between' option? User can then selet the range of the date. 





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

Proud to be a Super User!




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.