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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KarenKazab
Frequent Visitor

Date User Variable for multiple date columns

Hi all, 

 

In sql/ ssrs this would be a doddle and sure its probably easy enough in PBI Desktop. 

 

In sql I would have a user entered variable like @Date which the user would enter a date then this would filter the query on 2 columns: 

WHERE DimProperty.PropertyHandoverDate <= @Date
AND (DimProperty.DisposedDate IS NULL OR DimProperty.DisposedDate > @Date)

So I need a variable slicer if thats a thing, where the user would enter the date they want and then the slicer would filter on two different columns using two different methods? Any help would be greatly appreciated 

 

Thanks

 

Karen

3 REPLIES 3
Anonymous
Not applicable

Hi Karen,

 

Please clarify

 

1)  How are you loading data into Power Bi -  Direct Query or Import Load

2)  Do you want to use the paramater at load time or after data is loaded you want to build mesaures on the filtered data using the slicer on date.

 

It will be good if you can post some data and the output expected on Google / One Drive and share the link here.

 

Best Regards

 

CheenuSing

 

Sorry should have specified

1) Import load from a sql datawarehouse which is updated daily once in the morning

2) The parameter will be used after data load

 

Here is an example of data, I would only want the report to show 2 properties below as:

A is handed over after the parameter date to be used (30/06/2019)

B is handed over prior to the date but has been disposed of prior to the 30/06/2019

C is handed over prior to the date with no disposal date (blank)

D is handed over prior to the date and disposed of after the date so should still be included

 

Property Sequence NumberProperty Handover DateDisposed Date
A01/07/2019 
B02/06/201923/06/2019
C01/01/2000 
D01/01/200123/07/2019

 

Thanks

 

Karen

I have managed to get my slicer value date selection into a measure so now I need to find a way to either use this measure as a filter on two existing column filters i.e. I have a filter which uses the column PropertyHandoverDate and I would like this to be filtered by the new measure, or I need to create another measure which is something like this:

 

My slicer value selection measure is called DateSelectionMeasure

 

DateFilter = IF('Property'[PropertyHandoverDate] <= 'Property'[DateSelectionMeasure], "Yes", "No")

 

But when I start typing the Property table columns dont appear only the measures I have created, how do I pull in the columns? 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors