Forum Discussion
Lourini90
4 years agoFrequent Visitor
Aggregate Measure correctly by condition on DATEDIFF
I have the following Table: It represents processes with a certain category. And there is also a Date Table over column TIMESTAMP. I would like to show a Measure based on another Measu...
- 4 years ago
Hmm. I think ALLSELECTED ( DATUM ) is destroying the PROCESS filter context. Try ALLSELECTED ( DATUM[Date] ) instead.
I'm not sure that this will work though. There's a decent chance you'll have auto-exists trouble without a date dimension table.
v-yingjl
Community Support
4 years agoHi Lourini90 ,
You can try to modify the measures like this:
NEW =
IF (
HASONEVALUE ( 'Workflow'[PROCESS] ),
IF ( [AGE] <= 3, CALCULATE ( COUNT ( 'Workflow'[PROCESS] ), ALL ( DATUM ) ) ),
CALCULATE ( COUNT ( Workflow[PROCESS] ), FILTER ( 'Workflow', [AGE] <= 3 ) )
)OLD =
IF (
HASONEVALUE ( 'Workflow'[PROCESS] ),
IF ( [AGE] > 3, CALCULATE ( COUNT ( 'Workflow'[PROCESS] ), ALL ( DATUM ) ) ),
CALCULATE ( COUNT ( Workflow[PROCESS] ), FILTER ( 'Workflow', [AGE] > 3 ) )
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.