Forum Discussion
Case age calculation
- Anonymous3 years ago
Hi Anonymous ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a calculated column as below:
Case stage duration = VAR _predate = CALCULATE ( MAX ( 'Table'[Timestamp] ), FILTER ( 'Table', 'Table'[CaseNumber] = EARLIER ( 'Table'[CaseNumber] ) && 'Table'[Timestamp] < EARLIER ( 'Table'[Timestamp] ) ) ) RETURN IF ( 'Table'[NewValue] IN { "Pending Customer Response", "R&D/Product Management", "Solution Implemented" }, BLANK (), DATEDIFF ( _predate, 'Table'[Timestamp], DAY ) )In additon, you can refer the following links to get it:
If the above ones can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi Anonymous ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a calculated column as below:
Case stage duration =
VAR _predate =
CALCULATE (
MAX ( 'Table'[Timestamp] ),
FILTER (
'Table',
'Table'[CaseNumber] = EARLIER ( 'Table'[CaseNumber] )
&& 'Table'[Timestamp] < EARLIER ( 'Table'[Timestamp] )
)
)
RETURN
IF (
'Table'[NewValue]
IN {
"Pending Customer Response",
"R&D/Product Management",
"Solution Implemented"
},
BLANK (),
DATEDIFF ( _predate, 'Table'[Timestamp], DAY )
)
In additon, you can refer the following links to get it:
If the above ones can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- Anonymous3 years agoNot applicable
Hi,
Thank you so much. I just did a little modification to the Formula you suggested.
Instead of "NewValue" - I have changed to "OldValue". I Want to ignore how many days the case stays in "Pending Response" or "R&D" or "Resolved" - when it moves to another state.
So I said the formula to ignore the days between any of the above states to the new stage.
Now I need your help to Ignore the weekend (Saturday & Sunday) from the calculation.
Please support.