Forum Discussion

sekinod's avatar
sekinod
Icon for Helper II rankHelper II
5 years ago
Solved

Month End Value and Current Date Value

I have the following data which contains the target value for each month-end. So, what I want is when selecting a particular date on the slicer, All the months' end value for each month up to ...
  • mahoneypat's avatar
    5 years ago

    You can't add the slicer date easily, so here is a second measure you can add to the visual to show that.

     

    MaxDate in Target =
    VAR seldate =
        MIN ( Dates[Date] )
    VAR eomdate =
        CALCULATE (
            MAX ( Target[Date] ),
            ALL ( Dates )
        )
    RETURN
        IF (
            seldate < eomdate,
            seldate,
            eomdate
        )
     
    Regards,
    Pat