Forum Discussion
Multiple Column Relationship with the same date in a single model
- 3 years ago
VKravc1 , Add inactive join and activate in a measure using userelationship
If that does not work, then you need to create two copy of dimension
- 3 years ago
So finally it works - I just need to add second filter to CALCULATE and it must be exactly second table in USERLEATIONSHIP. So the correct measure is:
TestTest = CALCULATE('Calendar'[TotNumber], USERELATIONSHIP('Model: Location'[Current Location:], 'HlpTTS_data'[Location of residence before displacement]), USERELATIONSHIP('Model: Location'[Current Location:],'kobo_data'[Location of residence before displacement]) )amitchandak , thank you so much for your tip!
amitchandak , thanks for your feedback!
first one solution not exactly works - model looks like that:
So for "current location" i have active connection and for "location before" inactive.
I created measure:
TestTest = CALCULATE('Calendar'[TotNumber],
USERELATIONSHIP('Model: Location'[Current Location:], 'HlpTTS_data_'[Location of residence before displacement]) )
where [TotNumber] - total number of items, which we count, in this case - number of displaced. But i can't use argument from second table, because USERLEATIONSHIP takes only two arguments. So as a result, it returns correct data before 8th of Dec (because before it date it takes from "HlpTTS_data" table and incorrect since 8th of Dec (from this date all data take from the second table).
If USERELATIONSHIP unaccaptable for it case (or if i don't see correct solution), could You clarify, pls, about creation of "two copy of dimension"?
Thanks in advance!
So finally it works - I just need to add second filter to CALCULATE and it must be exactly second table in USERLEATIONSHIP. So the correct measure is:
TestTest = CALCULATE('Calendar'[TotNumber],
USERELATIONSHIP('Model: Location'[Current Location:], 'HlpTTS_data'[Location of residence before displacement]),
USERELATIONSHIP('Model: Location'[Current Location:],'kobo_data'[Location of residence before displacement])
)amitchandak , thank you so much for your tip!