Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jgtaveras
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
v-juanli-msft
Community Support
Community Support

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

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.