Forum Discussion
enoch99
Helper I
3 years agoDistinct Count by comparing two summarized tables
Hi everyone, I am new to DAX and need your support in solving this problem. I have two Excel files. One contains yearly target planned for different activities while the second contains mont...
- 3 years ago
enoch99 You can create a calculated column in Target table
Reached = SUMX ( FILTER ( Reached, [Activity] = EARLIEST ( Target[Activity] ) ), [Reached] )If you need a measure, then try the below measure
Lagging = VAR _target = ADDCOLUMNS ( Target, "@Reached", SUMX ( FILTER ( Reached, [Activity] = EARLIER ( Target[Activity] ) ), [Reached] ) ) VAR _result = COUNTX ( FILTER ( _target, [@Reached] < [Target] ), [Activity] ) RETURN _result
nandukrishnavs
Community Champion
3 years agoenoch99 You can create a calculated column in Target table
Reached =
SUMX (
FILTER ( Reached, [Activity] = EARLIEST ( Target[Activity] ) ),
[Reached]
)
If you need a measure, then try the below measure
Lagging =
VAR _target =
ADDCOLUMNS (
Target,
"@Reached",
SUMX (
FILTER ( Reached, [Activity] = EARLIER ( Target[Activity] ) ),
[Reached]
)
)
VAR _result =
COUNTX ( FILTER ( _target, [@Reached] < [Target] ), [Activity] )
RETURN
_resultenoch99
Helper I
3 years agonandukrishnavs Thank you for your quick response. This is what I was looking for.