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 September 15. Request your voucher.

Reply
NickEccles
Frequent Visitor

One date filter for multiple date columns in one table

My first post and apologies as I'm sure I found ther Answer to my question last week but can't find it now !

I'm new to Power BI and trialling it to replace lots of spreadsheets for our Companies KPI Reporting etc.

 

One fundemental thing I am trying to achive is on the Report have a filter or slicer that allows the report veiwer to select month & year, that then applies for all dates. for example, if I have a table of:

Order NumDate CreatedDate Delivered
5555128/03/2012/04/20
5555231/03/2008/04/20
5555331/03/2016/04/20
5555404/04/2028/04/20
5555520/04/2012/05/20
5555628/04/20 

 

On the report I want to be able to select April and 2020 then have to seperate visulisations,

1. Date Created which will show 3 (& info related to those 3)

2. Date Delivered which will show 4 (& info related to those 4)

 

I've looked at using a calendar table but as both fields are in the same table I can't create a relationship to both fields (I don't think).

 

I thought the solution I found was create a slicer with Date Created and then add Date Delivered (drag and drop onto the slicer), that would then apply the filter to visuals as those date fields are used in visuals.  Is that correct?  it appears to work this way but want to check if I'm missing something obvious or if there is a better way?

 

Thanks

 

Nick.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@NickEccles , you can join both dates one active and another one inactive and use userelation to activate one

Refer this blog how to do

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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

View solution in original post

Anonymous
Not applicable

HI @NickEccles,

Did your date field succeed recognize as date hierarchy? If this is a case, you can expand the hierarchy fields and extract the year and month fields to create slicers.

12.png

If not, you can also check the auto date/time option or create calculated columns with month and year function to extract year and month values form date field.

Apply auto date/time in Power BI Desktop 

Function Description
YEAR Returns the year of a date as a four-digit integer in the range 1900-9999.
MONTH Returns the month as a number from 1 (January) to 12 (December).

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
NickEccles
Frequent Visitor

Thanks all that helped a great deal.

Anonymous
Not applicable

HI @NickEccles,

Did your date field succeed recognize as date hierarchy? If this is a case, you can expand the hierarchy fields and extract the year and month fields to create slicers.

12.png

If not, you can also check the auto date/time option or create calculated columns with month and year function to extract year and month values form date field.

Apply auto date/time in Power BI Desktop 

Function Description
YEAR Returns the year of a date as a four-digit integer in the range 1900-9999.
MONTH Returns the month as a number from 1 (January) to 12 (December).

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@NickEccles , you can join both dates one active and another one inactive and use userelation to activate one

Refer this blog how to do

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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
mahoneypat
Microsoft Employee
Microsoft Employee

You can add a disconnected table with Dates to your model and use that in your slicer(s).  You would then have to adapt all your measures to use the selected value ( var slicerdate = selectedvalue(SlicerDate[Date]) and then use it in filter(s) for your measures).

 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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 Kudoed Authors