Forum Discussion
Direct query - relationship with multiple columns
- 7 years ago
Hi kchojnowski,
You could create below measures:
count for activation = CALCULATE ( COUNT ( StatusTable[Date Activation] ), FILTER ( ALL ( StatusTable ), StatusTable[Date Activation] = SELECTEDVALUE ( DateTable[Dates] ) ) ) count for deactivation = CALCULATE ( COUNT ( StatusTable[Date deactivation] ), FILTER ( ALL ( StatusTable ), StatusTable[Date deactivation] = SELECTEDVALUE ( DateTable[Dates] ) ) )Add DateTable[Dates] and above two measures into a table visual.
Best regards,
Yuliana Gu
- 7 years ago
Thanks for reply! I have made something like this and it worked:
CALCULATE(COUNT(<table[columnname]>),USERELATIONSHIP(table[mydate];calendar[date]))
Ofc before i have made relationship between date activation - calendard date and inactive relationship between date closed and calendar date :)
Hi kchojnowski,
You could create below measures:
count for activation =
CALCULATE (
COUNT ( StatusTable[Date Activation] ),
FILTER (
ALL ( StatusTable ),
StatusTable[Date Activation] = SELECTEDVALUE ( DateTable[Dates] )
)
)
count for deactivation =
CALCULATE (
COUNT ( StatusTable[Date deactivation] ),
FILTER (
ALL ( StatusTable ),
StatusTable[Date deactivation] = SELECTEDVALUE ( DateTable[Dates] )
)
)
Add DateTable[Dates] and above two measures into a table visual.
Best regards,
Yuliana Gu
Thanks for reply! I have made something like this and it worked:
CALCULATE(COUNT(<table[columnname]>),USERELATIONSHIP(table[mydate];calendar[date]))
Ofc before i have made relationship between date activation - calendard date and inactive relationship between date closed and calendar date :)
- Rekha7 years agoFrequent Visitor
Multiple relation ship not working in single table. Please suggest how to connect (give) multiple column relationship to single table