Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
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)
return
sumx(
FILTER(all('Calender Table'),'Calender Table'[Month Year] = FromSelectedMonth),
[$_Settlement]
)
To $_Settlements =
Var DefaultCurrentMonth = CALCULATE(max('Calender Table'[Month Year]),'Calender Table'[Current Month] = "Current Month")
var ToSelectedMonth = selectedvalue('To Month'[Month Year],DefaultCurrentMonth)
return
SUMX(
FILTER(all('Calender Table'),'Calender Table'[Month Year] = ToSelectedMonth),
[$_Settlement]
)
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
@adin , Not very clear. if you two need slicer ranges to refer to this . In place date range use month range
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
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.
https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions
Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |