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
alecsonline
Helper I
Helper I

Reporting values with sliding dates using a slicer to define how many days before or after

Hi all,

I have a very simple report: values for each day of the year.

 

My needing is:

beside the column with the values of the single date, I have to show the values related to a different day, that can be 1 or 2 or 3 or.... days before or after.

 

That means that the report user should have the possibility, using a slicer, to define "how many days" before or after.

I.E. looking at the value of 15th August, I want to able to show the value of the 12th August, if flagged "-3" in the related slicer.

 

Tried many ways, many many hours of tentatives without success.

 

PLEASE FIND PBIX FILE AT THIS LINK:

 

https://www.dropbox.com/s/5jjvnszhsmgtqsk/Test%20allineamento%20date.pbix?dl=0

Also following image as example:

Slicing dates.JPG

 

Thank you all for any help.

Alessandro

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @alecsonline ,

 

Please refer to measure:

N days before/after =
CALCULATE (
    [VALUE],
    FILTER (
        ALLSELECTED ( 'Calendar' ),
        'Calendar'[Date]
            = MAX ( 'Calendar'[Date] ) + [maxdayschangng]
    )
)

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft
Employee
Employee

Hi @alecsonline ,

 

Please refer to measure:

N days before/after =
CALCULATE (
    [VALUE],
    FILTER (
        ALLSELECTED ( 'Calendar' ),
        'Calendar'[Date]
            = MAX ( 'Calendar'[Date] ) + [maxdayschangng]
    )
)

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members 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.