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
randomUser21
Helper III
Helper III

select automatically day day month -1 ,-2 , -3...

hello everybody,

I want the user to select a date, and that automatically the same date month -1,-2,-3,-4 etc is selected

like this : (format dd/MM/YYYY)

randomUser21_1-1693991701684.png

is it possible to do this?
someone can help me please

 

 

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

Hi @randomUser21 ,

You can follow the steps below to get it:

1. Create a measure as below

Flag =
VAR _seldate =
    SELECTEDVALUE ( 'Date'[Date] )
VAR _curdate =
    SELECTEDVALUE ( 'Table'[Date] )
RETURN
    IF ( _curdate >= _seldate - 6 && _curdate <= _seldate, 1, 0 )

2. Apply a visual-level filter with the condition (Flag is 1) to filter the data on the visual

vyiruanmsft_1-1694163434487.png

Best Regards

Community Support Team _ Rena
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

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @randomUser21 ,

You can follow the steps below to get it:

1. Create a measure as below

Flag =
VAR _seldate =
    SELECTEDVALUE ( 'Date'[Date] )
VAR _curdate =
    SELECTEDVALUE ( 'Table'[Date] )
RETURN
    IF ( _curdate >= _seldate - 6 && _curdate <= _seldate, 1, 0 )

2. Apply a visual-level filter with the condition (Flag is 1) to filter the data on the visual

vyiruanmsft_1-1694163434487.png

Best Regards

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

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!

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.