Forum Discussion
Periods Comparison
- 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.
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.
- Yousra-ali11 months agoNew Member
Thank you so much danextian