Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Let Users select the comparison months they are interested in



I want to give my users the ability to select two different months from which to compare various measures. 


I have a separate calendar table, and separate tables for the FROM month and the TO month which they will be comparing to. I can not work out how to remove the context from of the measures so that when you select one month in the FROM slicer it doesn't affect the other measure.  


Below is the code I'm using for the two measures.


From $_Settlements = 

Var DefaultPreviousMonth = CALCULATE(max('Calender Table'[Month Year]),'Calender Table'[Previous Month] = "Previous Month")
var FromSelectedMonth = selectedvalue('From Month'[Month Year],DefaultPreviousMonth)

FILTER(all('Calender Table'),'Calender Table'[Month Year] = FromSelectedMonth),


To $_Settlements = 

Var DefaultCurrentMonth = CALCULATE(max('Calender Table'[Month Year]),'Calender Table'[Current Month] = "Current Month")
var ToSelectedMonth = selectedvalue('To Month'[Month Year],DefaultCurrentMonth)

FILTER(all('Calender Table'),'Calender Table'[Month Year] = ToSelectedMonth),


Community Champion
Community Champion

Hi @adin 


This issue arises when we have interactions to filter between two visuals.

Here is the link for your referance on how to edit interactions.



Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!




Hope it resolves your issue? Please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos, Press the thumbs up button!!👍


Super User IV
Super User IV

@adin , Not very clear. if you two need slicer ranges to refer to this . In place date range use month range

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Community Support
Community Support

Hi , @adin 

Is there any relationship between the three tables?

I'm not sure about your problem, can  you  show the relevant screenshots  or sample pbix file if possible.


Best Regards,
Community Support Team _ Eason

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!


Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors