Forum Discussion
Data Model - switch relation from inactive to active by condition.
Hi Greg,
Tks For your respond.
I saw USERELATIONSHIP Function Before I posted.
I didn't understand how to use it.
1.Where to put it -> table Active or table Inactive
2.This function need Calculate formula -> However I don't have anything to put in
3.Is a Measure or calculated column ?
If you can, Pls help me to build the formula
Tks A lot
Regards,
Idan
- Greg_Deckler7 years ago
Community Champion
Quick question, why can't you just Append your Table1 and Table2 so that you eliminate the issue?
- Anonymous7 years agoNot applicable
In this case I just simplified my tables.
In reality I've 2 fact tables contain 500K Rows Each and I want to add filter which filter both.Thank you Greg for your kindness
Idan
- v-cherch-msft7 years ago
Microsoft Employee
Hi Anonymous
You may set the relationships as inactive. Then create the measures with USERELATIONSHIP Function. For example:
Index1 = CALCULATE(SUM(Table1[index]),USERELATIONSHIP(Table1[index],'filter'[index]))
Index2 = CALCULATE(SUM(Table2[index]),USERELATIONSHIP('filter'[index],Table2[index]))Attached the sample file for your reference. Below are some articles for you. Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.
Regards,
Cherie