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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mmazzalay
Frequent Visitor

Date Filters

Hi community! I need to filter a date column by a selected value on the report of an other date column, which is a date too.

I´ll be more especific, I have:

*Date Column 1, wich can be filter by the user on the report. User can choose only one value.
*Date Column 2: This is the date column that I need be filtered. I need that it shows only the dates before the selected value in Date Table 1.

How can I solve it? Any idea?

Thanks!

1 ACCEPTED SOLUTION

Hi @mmazzalay ,

 

Please create a measure and add it to the filter on the visual.

Measure = 
IF(
    MAX('Date Table 2'[Date]) > SELECTEDVALUE('Date Table 1'[Date]),
    1, 0
)

v-lionel-msft_0-1594791574012.png

v-lionel-msft_1-1594791648877.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

4 REPLIES 4
Pragati11
Super User
Super User

Hi @mmazzalay ,

 

Create 2 slicers one each for your both date columns.

Now click on first date slicer and go to edit interactions and check if the 2nd slicer has filter option enabled.

 

Once this is done, whenever you select a data range in your 1st date slicer, 2nd slicer will show date range based on the selection.

Something like this:

Pragati11_0-1594738331115.png

For setting up edit interactions in Power BI, refer following article:

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thank you for your help, but it doesn't solve the issue.
I need that if on the first filter (Date Report) the user select 29/5/2020, the second filter (Periods) only shows the dates after 29/5/2020.

mmazzalay_0-1594740914283.png

 

Hi @mmazzalay ,

 

Please create a measure and add it to the filter on the visual.

Measure = 
IF(
    MAX('Date Table 2'[Date]) > SELECTEDVALUE('Date Table 1'[Date]),
    1, 0
)

v-lionel-msft_0-1594791574012.png

v-lionel-msft_1-1594791648877.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Hi @mmazzalay ,

 

Make your Periods slicer a date range slicer like I have in my screesnhot.

Also are your date columns (both) are of DATE datatype or string?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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