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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors