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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
randomUser21
Resolver I
Resolver I

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
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors