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)