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
Anonymous
Not applicable

date/time slicer( if I have many direct queries (KQL & SQL) in the same report and fromdate & todate

I have a power bi report contains many queries (direct queries from KQL & SQL) and I have two columns (fromdate & todate) so in the report I have to create two slicers (fromdate) and todate . then the only option is to select from the drop down slicers . how can I have one slicer only instead of the two slicers 

4 REPLIES 4
barwe
Helper I
Helper I

You need only one Date table.

Thats the all tables, no connections: 

barwe_0-1690467730468.png

DimDate = CALENDARAUTO()
MaxFilter = IF(Selectedvalue('FactTable'[todate]) <= CALCULATE(MAX('DimDate'[Date])),1,0)
MinFilter = IF(Selectedvalue('FactTable'[fromdate]) >= CALCULATE(MIN('DimDate'[Date])),1,0)


 

Now you can have only one slicer: 
barwe_4-1690467945720.png

 

barwe_5-1690467969753.png

 



 

 

 

 

Anonymous
Not applicable

I did the same, still the slicer is not active 

 

waelassad_0-1690469160320.png

 

barwe
Helper I
Helper I

You probably can see only drop down because you are using "date hierarchy" no "Date"

barwe_0-1690463161073.png

 

Not sure if this is the best solution it should work:

1. Create an new teble "DimDate" that contains date column.

2. Then create a slicer with that DimDate[date].

3. Add 2 extra measures that will chacek what max and min value from "DimDate" are and comare them to your date columns.

MinFilter =IF(Selectedvalue('Your_Table'[fromdate]) >= CALCULATE(MIN('Table'[Date])),1,0)
MaxFilter =IF(Selectedvalue('Your_Table'[todate]) >= CALCULATE(MAX('Table'[Date])),1,0)
4. Add those filters to the visual and set them to  1

Anonymous
Not applicable

thank you for your feedback, I choose date not date hierarchy , could I know how to create DimDate 

in the fromdate I'm using 

FromDates = CALENDAR(date(YEAR(TODAY())-1,MONTH(TODAY()), 1), TODAY())
 
and todate
ToDates = CALENDAR(date(YEAR(TODAY())-1,MONTH(TODAY()), 1), TODAY())

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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