Forum Discussion
luxpbi
7 years agoHelper V
Time Intelligence with 2 calendars
Hi! This is my scenario: I have 1 fact table [Fact] with 2 dates and 2 calendars, [CalendarA] and [CalendarB]. I have both calendars with active relationships with the facts table. One dat...
- 7 years ago
Hi luxpbi
You may use USERELATIONSHIP Function.Please check attached file.
Reference:https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Measure B = CALCULATE( DISTINCTCOUNT( TableA[Booking number]),USERELATIONSHIP(CalendarA[DateA],TableA[DateB]))Measure B LY = CALCULATE( [Measure B], SAMEPERIODLASTYEAR( CalendarA[DateA].[Date]))Regards,
luxpbi
7 years agoHelper V
Hi v-cherch-msft ,
It works as expected, but I need the next scenario:
If I filter year everything works fine:
but if I filter Month I need to see all future dates for Measure B.
Hope you can help in this scenario.
Thank you a lot !! for your help :)
v-cherch-msft
7 years agoMicrosoft Employee
Hi luxpbi
I would suggest you create a new thread on forum so that more community members can see it and provide advice. Please remember to post dummy data and desired result.
Regards,