Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter Measure Between Dates

I have data which has a from and to date, with the date it is created in the from and the date its no longer active in the to column. I created a filter measure so I can selected a date from a discon...
  • Anonymous's avatar
    Anonymous
    6 years ago

    I managed to created a count measure that works as I would like;

    Count of Active =

    VAR __SelectedDate = [Selected Date]
    Return
    CALCULATE(COUNT('Risk Data'[Id]),__SelectedDate>'Risk Data'[FromTT], IF(ISBLANK('Risk Data'[ToTT]), TRUE(), __SelectedDate<'Risk Data'[ToTT]))

    But I'm not sure how'd I go about turning this into a true/false filter measure of each risk ID
  • v-lili6-msft's avatar
    v-lili6-msft
    6 years ago

    hi Anonymous 


    Anonymous wrote:

    I managed to created a count measure that works as I would like;

    Count of Active =

    VAR __SelectedDate = [Selected Date]
    Return
    CALCULATE(COUNT('Risk Data'[Id]),__SelectedDate>'Risk Data'[FromTT], IF(ISBLANK('Risk Data'[ToTT]), TRUE(), __SelectedDate<'Risk Data'[ToTT]))

    But I'm not sure how'd I go about turning this into a true/false filter measure of each risk ID

    I have test on my side, This formula works well, and what is " I'm not sure how'd I go about turning this into a true/false filter measure of each risk ID"?

     

    Regards,

    Lin

  • Anonymous's avatar
    Anonymous
    6 years ago

    Ah sorry, I've just realized if I use my count of acting as the visual level filter, I just need to set it to is greater than 0 to get the effect I was looking for.

    The previous response about setting the filter to true was confusing me since it wasn't an IF measure.