Forum Discussion

ShaneL79's avatar
ShaneL79
Icon for Helper I rankHelper I
5 years ago

Slicer Default Stopped Working

Hello Everyone,

 

My slicer has randomly stopped working. I have not updated the file in nearly 6 months.

 

My report is a weekly report. The slicer lists the last day of each report in a drop down. There is also a "Most Recent" which shows the last full report. The code for this is below:

 

Dropdown selection = IF (
    [End of Week]
        = CALCULATE (
            MAX ( Alarms[Alarm Received Date] ),
            FILTER ( ALL ( alarms ), WEEKDAY ( Alarms[Alarm Received Date], 1 ) = 7 )
        ),
    "Most Recent",
    FORMAT ( [End of Week], "yyyy-mm-dd" )
)

 

For example, the slicer on 1/5/2021 should be:

 

1/9/2021

Most Recent

12/26/2020

12/19/2020

12/12/2020

etc...

 

Unfortunately, it is currently showing the following:

 

1/9/2021

1/2/2021

Most Recent

12/19/2020

12/12/2020

etc...

 

It looks like the "Most Recent" field stopped updating once we hit 2021. I can't seem to figure out how or where to fix this. Any idea's what I am missing?

3 Replies

  • ShaneL79 , Check what is MAX ( Alarms[Alarm Received Date] ) date you have. I doubt data is not coming properly. That could be the reason. The formula seems fine.  Seem like you are not getting data for 2021 for Alarm Received Date

     

    or you table has some missing dates

    • ShaneL79's avatar
      ShaneL79
      Icon for Helper I rankHelper I

      amitchandak, the last whole report date was 1/2/2021, but the Alarms[Alarm Received Date] does not have a record on that day since there were no alarms on that day. A day without an alarm is extremely uncommon (maybe 1-2 times a year), so it falling on a date that defines the end date of a report makes sense since it has no way to compare that. I guess I will have to wait until this weekend to see if it updates properly. 

       

      Thanks for giving me a place to start looking.