Forum Discussion
Null values on date filters
- 7 years ago
Hi jgtaveras
It seems your condition is
my_date > [some user entered value] or my_date is null
When using a page filter, it hard date information inside,
Currently, i can't find a way to use a page level filter with custom user-defined value.
Here is a workaround with custom user-defined value using Visual level filter.
to make it changes with user's selection, you need create measures.
If you have a date table "Datetable", then add [date] column in a slicer, users can select from this slicer, this selected value is called "custom user-defined value",
if so, then just cretae measures below
selected=SELECTEDVALUE(Datetable[date])
flag = IF(MAX([Date])>[selected]||MAX([Date])<>BLANK(),1,0)If user enter date on their own instead of selecting from the exsited column,
create three What If Parameter to define the "year", "month", "day" values.
Please read reference to learn how to do it.
then use these parameter in the measure
user-defined date = DATE([Parameter Value],[Parameter Value 2],[Parameter Value 3])
flag = IF(MAX([Date])>[user-defined date]||MAX([Date])<>BLANK(),1,0)Finally add [flag] in the Visual level filter, and select "show values when item is 1"Best Regards
Maggie
Hi jgtaveras
It seems your condition is
my_date > [some user entered value] or my_date is null
When using a page filter, it hard date information inside,
Currently, i can't find a way to use a page level filter with custom user-defined value.
Here is a workaround with custom user-defined value using Visual level filter.
to make it changes with user's selection, you need create measures.
If you have a date table "Datetable", then add [date] column in a slicer, users can select from this slicer, this selected value is called "custom user-defined value",
if so, then just cretae measures below
selected=SELECTEDVALUE(Datetable[date])
flag = IF(MAX([Date])>[selected]||MAX([Date])<>BLANK(),1,0)
If user enter date on their own instead of selecting from the exsited column,
create three What If Parameter to define the "year", "month", "day" values.
Please read reference to learn how to do it.
then use these parameter in the measure
user-defined date = DATE([Parameter Value],[Parameter Value 2],[Parameter Value 3])
flag = IF(MAX([Date])>[user-defined date]||MAX([Date])<>BLANK(),1,0)
Best Regards
Maggie