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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

One date slicer that has From and To Date

Hi everyone, 

 

I am wondering if anyone knows how to make the date slicer get values from two columns. take the from date from one column and the to date from another column. My limitation is I have to use direct query so i can't use M. Only dax measures. 

 

5 REPLIES 5
Anonymous
Not applicable

Screenshot (5).pngScreenshot (7).png

 

Hey Everyone sorry for the lack of description examples. I am trying to attach photos. 

 

For example, with the date slicer slider visual, I want to take dates like 1/1/2018 from Read From column and date like 1/1/2020 from Read To Column. 

 

@Greg_Deckler  @amitchandak  @v-deddai1-msft 

Hi @Anonymous 

Correct me if I am wrong, what you want to do is to create a date slicer which includes all dates where the MIN DATE is coming from the first column and the MAX DATE must be from the second colulmn ?

v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Would you please show us some sample date if possible? Is this two columns from the same table? I suggest you create a calendar table for date slicer and create relationship between the table and the calendar table by date column.

 

For the details, please refer to the similar thread: https://community.powerbi.com/t5/Desktop/Date-Slicer-for-multiple-columns-in-different-tables/td-p/352873

 

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@Anonymous 

I doubt with initial description . But you can use the min date max date for two purposes. You can filter different dates. By using userelation or without using userelation

 

Something like. Here you need change use relation to different date column

measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])

return
CALCULATE(SUM(Table[values ]), FILTER(all('Date'), 'Date'[Date] =_max), userelation(COlum1)) -
CALCULATE(SUM(Table[values ]), FILTER(all('Date'), 'Date'[Date] =_min), userelation(COlum2))

 

Refer example of userelation

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Greg_Deckler
Super User
Super User

Probably possible, but would need to see sample data to be sure. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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