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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
LucianoB_
Frequent Visitor

Add a date filter following a Field Parameters slicer selection.

Hi,

 

I have a table with 2 dates and a few measurements:

 

Date 1             Date 2              Measuremente
01/01/202312/01/202210
01/02/202301/01/202323
01/03/202302/01/202345

 

I want a dynamic X-axis, so I created a Field Paramenter with Date 1 and Date 2:

 

Date 1 or Date 2 = {
    ("Date 1", NAMEOF('Table'[Date 1].[Month]), 0),
    ("Date 2", NAMEOF('Table'[Date 2].[Month]), 1)
}
 
Slicer works as expected, however after selecting one of the options (Date 1 or Date 2), I would like the date to show only 2023 and forward.
 
By using the table above it should filter like this:
 
Day 1 selected
Date 1              Date 2              Measuremente
01/01/202312/01/202210
01/02/202301/01/202323
01/03/202302/01/202345

 

Day 2 selected

Date 1                 Date 2                  Measuremente
01/02/202301/01/202323
01/03/202302/01/202345

 

 

Appreciate your help.
1 ACCEPTED SOLUTION
LucianoB_
Frequent Visitor

Thank you all

 

I was able to solve this issue by using the following tutorial.

https://blog.enterprisedna.co/working-with-multiple-dates-in-power-bi/

View solution in original post

3 REPLIES 3
LucianoB_
Frequent Visitor

Thank you all

 

I was able to solve this issue by using the following tutorial.

https://blog.enterprisedna.co/working-with-multiple-dates-in-power-bi/

Anonymous
Not applicable

Hi @LucianoB_ ,

 

You can create a measure as a visual-level filter.

Measure =
SWITCH (
    SELECTEDVALUE ( Parameter[Parameter Fields] ),
    "'Table'[Date 1]", IF ( YEAR ( MAX ( 'Table'[Date 1] ) ) = 2023, 1 ),
    "'Table'[Date 2]", IF ( YEAR ( MAX ( 'Table'[Date 2] ) ) = 2023, 1 )
)

Put this measure into the filters, set up show items when the value is 1.

vstephenmsft_0-1676367303590.png

Here're the results.

vstephenmsft_1-1676367338253.pngvstephenmsft_2-1676367344726.png

 

Best Regards,

Stephen Tao

 

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

Thank you so much @Anonymous, I realy appreciate your help.

 

That worked very well with the full date, however I am using Month on the Paramenter Field ('Table'[Date 1].[Month]), and the filter is returning blank.

 

I took your sample file and added a 2nd Parameter:

 

 

Parameter2 = {
    ("[Date 1].[Month]", NAMEOF('Table'[Date 1].[Month]), 0),
    ("[Date 2].[Month]", NAMEOF('Table'[Date 2].[Month]), 1)
}

 

 

 

Here are the results:

LucianoB__2-1676469981583.png

 

 

This is what I am trying to achive:

LucianoB__1-1676469761581.png

 

Thank again for your help.

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