Forum Discussion
kchojnowski
7 years agoFrequent Visitor
Direct query - relationship with multiple columns
Hi, DQ - connection with SQL Server I have slicer with calendar. Need to make relationship with table, which has one status column and two date columns: date activation and date deactivation. They ...
- 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 :)
kchojnowski
7 years agoFrequent Visitor
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 :)
Rekha
7 years agoFrequent Visitor
Multiple relation ship not working in single table. Please suggest how to connect (give) multiple column relationship to single table