Forum Discussion

Sagimore88's avatar
Sagimore88
Frequent Visitor
4 years ago
Solved

Blank In Search Filter

Hello 🙂

I have slicer on the page that is a measure- It is taking a value from a datefiff column and returning  text.

Column is a datefiff in months -

Overdue Period = DATEDIFF('Policy DimPolicy'[Received_DT], TODAY(),MONTH)

Measure=

OverdueGroup = IF('Policy DimPolicy'[Overdue Period] < 3, "Exclude",
IF('Policy DimPolicy'[Overdue Period] > 2 && 'Policy DimPolicy'[Overdue Period] < 7, "3-6 Months",
IF('Policy DimPolicy'[Overdue Period] > 5 && 'Policy DimPolicy'[Overdue Period] < 10, "6-9 Months",
IF('Policy DimPolicy'[Overdue Period] > 8 && 'Policy DimPolicy'[Overdue Period] < 13, "9-12 Months",
IF('Policy DimPolicy'[Overdue Period] > 11 && 'Policy DimPolicy'[Overdue Period] < 25, "1-2 Years", "Over 2 Years")))))
 
This works fine, but the slicer on the page still give the option to select blanks. I have change the filter to not include blanks.
Im guessing I need an IF statement added to the above measure or column to do a  IF blank, "Exclude" but I cant seem to get the correct syntax for that. Any help is appreciated.
 

 

 

2 Replies

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Community Support

    Hi Sagimore88 ,

     

    This is a small mistake. Change And to Or.

     

     

    And means items which does not contain exclude, and the same time it should be no blank. But blank does not match "does not contain" this situation. So, please change to Or.

     

    Best Regards

    Community Support Team _ chenwu zhu

     

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