Forum Discussion

NewbieJono's avatar
NewbieJono
Icon for Post Partisan rankPost Partisan
5 years ago
Solved

max and min slider

i have a date table and a volumes table.   what would i need to do to get the diffrence in volumes between the max and min dates on the slider.   e.g if the min selected date was 01/01/2000 volum...
  • mahoneypat's avatar
    5 years ago

    You can use a measure like this

     

    Difference =
    VAR vMinDate =
        MIN ( Date[Date] )
    VAR vMaxDate =
        MAX ( Date[Date] )
    VAR vMinVol =
        CALCULATE ( [Volume Measure], Date[Date] = vMinDate )
    VAR vMaxVol =
        CALCULATE ( [Volume Measure], Date[Date] = vMaxDate )
    RETURN
        vMaxVol - vMinVol

     

    Pat