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.

View discussion in a popup

Replying to:
Anonymous
Not applicable

Hi adityah , hello All, thank you for your prompt reply!

Create a new calculated Date table as the slicer, then create a new measure as shown below:

past 3 years = 
VAR data_year = YEAR(SELECTEDVALUE('FactTable'[date]))

VAR slicer_year = SELECTEDVALUE('DuplicateDate'[Date].[Year])
RETURN
IF(data_year<=slicer_year && data_year>slicer_year-3,
    1,
    0
)

Then add the measure to visual filter like this:


Result for your reference:

 

Best regards,

Joyce

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