cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jgtaveras New Member
New Member

Null values on date filters

i have a query that has a condition that go like this: And (my_date > [some user entered value] or my_date is null), i was trying to do it with a page filter, but i don't know how to make it with that custom user-defined value since tried with an advance filter but that only sets it to a specific date.

 

Plz take into account that im new at this

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Null values on date filters

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"
 
5.png
 
 

 

 

 

Best Regards

Maggie

1 REPLY 1
Community Support Team
Community Support Team

Re: Null values on date filters

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"
 
5.png
 
 

 

 

 

Best Regards

Maggie