Forum Discussion

RaphaelSlalom's avatar
RaphaelSlalom
Regular Visitor
4 years ago
Solved

Creating Date Slicer for when values are not blank

Hello, 

I need the ability to create a date slicer that will only show a range where the values during that time are not NULL.

 

Example

SiteDate/TimeHow many Units
A4-5-2022 12:00 PM0
B4-6-2022 12:00 PM2

C

4-7-2022 12:00 PM2
D4-8-2022 12:00 PM0


Any ideas here? I think using FILTER in Dax would do the trick but not sure. 

Thanks. 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi RaphaelSlalom ,

     

    We generally use Measure as a visual-level filter, but it cannot be used in Slicer.

    Measure = 
    var _minBlankDate= MINX(FILTER(ALLSELECTED('Table'),ISBLANK([How many Units])),[Date/Time])
    return IF(MAX('Table'[Date/Time])<_minBlankDate,1,0)

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    RaphaelSlalom 
    I think you should not add the filter in dax rather you can try to add the filter on visual level, page level or Report level this will definately work and your measure wont be complex

    • RaphaelSlalom's avatar
      RaphaelSlalom
      Regular Visitor

      I would agree with you except I have another filter (relative date, "last 5 days" that seems to be overwriting the "how Many units filter"

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RaphaelSlalom ,

     

    We generally use Measure as a visual-level filter, but it cannot be used in Slicer.

    Measure = 
    var _minBlankDate= MINX(FILTER(ALLSELECTED('Table'),ISBLANK([How many Units])),[Date/Time])
    return IF(MAX('Table'[Date/Time])<_minBlankDate,1,0)

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.