Forum Discussion
Yousra-ali
11 months agoNew Member
Periods Comparison
Hello Dears, i have created table date and dublictae it and call it comparison, i have linked it to the main sales table i have, so now i have 2 slicer one is current period and the other one is ...
- 11 months ago
Hi Yousra-ali
If the goal is to compare to periods controlled by different slicers, use a second dates/calendar table that has an active relationship to your fact table. Invoke the inactive relationship in a table using USERELATIONSHIP. You also need to remove the filter coming from the dates table with an active relationship to fact
Total Revenue Comparison = CALCULATE ( [Total Revenue], USERELATIONSHIP ( ComparisonDates[Date], Data[Date] ), REMOVEFILTERS ( Dates ) )Please see the attached pbix.
Cookistador
Super User
11 months agoHello Yousra-ali
As you have two sclicers, the best thing to do is to disconnected your second date dimension and in the measure used something like:
P.P TTL SAL =
VAR SelectedDate = SELECTEDVALUE('Date'[Date],blank())
RETURN
CALCULATE(
[YourMeasure],
ALL(...)
[YourMeasure],
ALL(...)
'Table'[Date] = SelectedDate)
If you need more help to set up the measure, do not hesistate to share a dummy dataset 🙂
If you need more help to set up the measure, do not hesistate to share a dummy dataset 🙂