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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Filter table rows by Date Table , where Main Table contains dates in 5 columns and can be duplicate

Hi users, 

 

I need to filter my table as per selected date or date range from Date table column (refer left side of the image) and I need to filter weather the range of those dates contains in my 5 columns to get the ChosenSeat falls in that date range. 

 

 

ashwanikumar1_1-1596554315713.png

 

I'm trying to messing around, but can't get it working. Any help would be appreciated. 

Thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

I'd like to suggest you create a duplicate table and apply unpivot columns on the copied table, you can link this new table with raw tables and it does not affect the raw table relationships.

Regards,

Xiaoxin Sheng

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hi @Anonymous,

I'd like to suggest you unpivot your date fields then you cna simply filter across raw date fields.

Unpivot columns (Power Query) 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

@Anonymous , tried it and it throws an error to all the Table values. Also tried with changing the data type of these columns.

Anonymous
Not applicable

Hi @Anonymous,

I'd like to suggest you create a duplicate table and apply unpivot columns on the copied table, you can link this new table with raw tables and it does not affect the raw table relationships.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

@Anonymous Seems, like it worked. Thanks , I didn't thaught of duplicating it , and not sure how its worked. 

 

If you can explain on how its worked with duplicating table, and what will happen if I delete the previous table, which is not in use for any visuals ?

 

Thanks again, marked that as a solution for this Issue. 

amitchandak
Super User
Super User

@Anonymous , Create a date table join with all dates. One active, all other inactive. Create a formula to count based on all dates using userelation.

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184


Appreciate your Kudos.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak, Links looks very good, 

 

But I think those still doesn't clear and gives my answer. I could easily change by date from 'dd mmmm yyyy' to 'dd-mm-yyyy'. 

 

But I still need to filter out my data as based on the date range. Its a simple filter but my main table does contain duplicate dates and in all 5 column and I need that. In the above shown image , for selected date range, if my data will filter out for right hand side ticked rows, that will be the answer to my current issue.  

 

Hope it makes sense, what i'm trying to achieve. But if you response does contains the solution, then that probabely I didn't understand it well, i think 🤔.

@Anonymous ,Can you share sample data and sample output in table format? 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Apologies my shared excel link has been removed by Moderator.

Here a sample data how its looks like, This is my main table which I need to filter it out by date range (Slicer having Date Table).

and the column ( Date1 to Date5 ) should filter out when I select any date range which lies in any of these 5 columns. 

 

Hope this make sense. 

 

ChosenSeatDate1Date2Date3Date4Date5

 Seat 612-07-2020 00:0013-07-2020 00:00   
Seat 1029-07-2020 00:00    
Seat 10602-07-2020 00:0003-07-2020 00:0004-07-2020 00:0005-07-2020 00:00 
Seat 10931-07-2020 00:0001-08-2020 00:0002-08-2020 00:0003-08-2020 00:00 
Seat 1302-07-2020 00:0003-07-2020 00:0004-07-2020 00:00  
Seat 1306-07-2020 00:0007-07-2020 00:00   
Seat 1504-07-2020 00:0005-07-2020 00:0006-07-2020 00:0007-07-2020 00:00 
Seat 1702-07-2020 00:00    
Seat 1729-07-2020 00:00    
Seat 1929-07-2020 00:00    
Seat 1904-08-2020 00:00    
Seat 2102-07-2020 00:0003-07-2020 00:00   
Seat 2303-07-2020 00:0004-07-2020 00:0005-07-2020 00:00  
Seat 2703-07-2020 00:0004-07-2020 00:0005-07-2020 00:00  
Anonymous
Not applicable

@amitchandak Sure you can downlaod a sample file from here Data.xlxs

 

Column Date1 to Date5 does contains the dates, If my filter date contains in any of these Date Columns (which is from Date1 to Date5), then I need to show the 'ChosenSeat' it in my table view. 

 

filter date is just a Date Table. 

Anonymous
Not applicable

Ahh , got my post unmarked as spam, Autopost spam filteration need imporvement.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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