Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All
I've got a relatively simple DAX issue which is elluding me!
I'm trying to count the number of days in a given "Stage" of a workflow, I can count the days between stages which are complete using the formula below but I need to add a second condition that calculates the difference between the start date and today's date (when a stage is not yet complete). Any ideas?
Solved! Go to Solution.
Hey @Faye1901
You can use a variable.
Time in stage ALL =
VAR _StageCompletionDate = IF(StageCompletionDate = BLANK(), TODAY(), StageCompletionDate)
RETURN
DATEDIFF('All Workflow Data'[StageEntryDate], _StageCompletionDate, DAY)
Thanks!
A
Hey @Faye1901
You can use a variable.
Time in stage ALL =
VAR _StageCompletionDate = IF(StageCompletionDate = BLANK(), TODAY(), StageCompletionDate)
RETURN
DATEDIFF('All Workflow Data'[StageEntryDate], _StageCompletionDate, DAY)
Thanks!
A
That works perfectly thank you.
Hello @Faye1901
See if this works for you.
Time in stage ALL = DATEDIFF ( 'All Workflow Data'[StageEntryDate], IF ( ISBLANK ( 'All Workflow Data'[StageCompletionDate] ), TODAY (), 'All Workflow Data'[StageCompletionDate] ), DAY )
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |