Forum Discussion
Counting records based on two dates, second count must exclude records from the first
- 1 year ago
I was able to use this as a basis and got it working:
Edited Count =
CALCULATE(
COUNTROWS(FactTable),
USERELATIONSHIP(DateTable[Date], FactTable[EditedDate]),
NOT(FactTable[RecordID] IN VALUES(FactTable[RecordID]))
)I'm not sure how this is giving me the correct answer, but it must recognize the context that the two FactTable[RecordID]s are from different sets.
Hey , use this Approach
Edited Count =
CALCULATE(
COUNTROWS(FactTable),
USERELATIONSHIP(DateTable[Date], FactTable[EditedDate]),
NOT(
CONTAINS(
VALUES(FactTable[RecordID]),
FactTable[RecordID],
CALCULATETABLE(
VALUES(FactTable[RecordID]),
USERELATIONSHIP(DateTable[Date], FactTable[AddedDate])
)
)
)
)
I was able to use this as a basis and got it working:
Edited Count =
CALCULATE(
COUNTROWS(FactTable),
USERELATIONSHIP(DateTable[Date], FactTable[EditedDate]),
NOT(FactTable[RecordID] IN VALUES(FactTable[RecordID]))
)
I'm not sure how this is giving me the correct answer, but it must recognize the context that the two FactTable[RecordID]s are from different sets.