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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
nachoroncero
Frequent Visitor

New in Power BI - Using two date filters

Hello,

 

Sorry if y question is too newbie, it is my first time using this tool.

 

I am trying to show the results of a company in a specific month, but also in during a period of time.

In the guage, I would like to see the result for August 2018, and in the line chart, I would like to see all the results from 2017 to August 2018.

One solution is using two slicers, one for the specifict month, and the other to set the period and male it interact only with the line chart. This works, but it is not efficient.

nachoroncero_0-1646234146888.png

 

I believe there must be a way to capture the month selected in the filter above, and use THAT same value for the second slicer that filters the time period.

How can I do that so I only have to indicate the desired month once?

 

Thank you ver much for your time!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @nachoroncero , 

Please refer to my pbix file to see if it helps you.

Create a measure.

 

Measure =
VAR _start =
    DATE ( 2017, 1, 1 )
VAR _value =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[date] >= _start
                && 'Table'[date] <= SELECTEDVALUE ( 'Table 2'[Date] )
        )
    )
RETURN
    _value

 

 

Cancel the work of the slicer on the guage, select Format>>Edit interaction.  

vpollymsft_0-1648099985696.png

Then choose none.

vpollymsft_1-1648100054255.png

Then filter the data on this visual.

vpollymsft_2-1648100122254.png

 

 

vpollymsft_3-1648100145746.png

 

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @nachoroncero , 

Please refer to my pbix file to see if it helps you.

Create a measure.

 

Measure =
VAR _start =
    DATE ( 2017, 1, 1 )
VAR _value =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[date] >= _start
                && 'Table'[date] <= SELECTEDVALUE ( 'Table 2'[Date] )
        )
    )
RETURN
    _value

 

 

Cancel the work of the slicer on the guage, select Format>>Edit interaction.  

vpollymsft_0-1648099985696.png

Then choose none.

vpollymsft_1-1648100054255.png

Then filter the data on this visual.

vpollymsft_2-1648100122254.png

 

 

vpollymsft_3-1648100145746.png

 

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

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

 

amitchandak
Super User
Super User

@nachoroncero , Assuming the date table is governing, then we can get min and max month

 

Meausre =
var _min = eomonth(minx(allselected('Date'), 'Date'[Date]),0)
var _max = eomonth(maxx(allselected('Date'), 'Date'[Date]),0)
return
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),eomonth('Date'[Date],0) = _max)) - CALCULATE(sum('Table'[Qty]), FILTER(('Date'),eomonth('Date'[Date],0) =_min))

 

 

or

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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