Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two types of hours.
Hours 1 are shown at the process level.
Hours 2 are shown at the sub-process level. I was initially told that Hours1 > Hours2 always.
My bar chart needs to show stacked Hours2 and Hours3 (which represent the difference of Hours1-Hours2).
My bar chart works well, unless Hours1<Hours2 (which sometimes happens). I really don't need to show negative difference. It doesn't have to be a difference at all, just a separate category. I am sure there is a better way to do it.
Please see attached example.
If you want Hours3 to always be positive, you can wrap it in the fabs() function:
fabs(Sum (DISTINCT Hours1) - Sum (Hours2))
Try this expression for Hours3:
=if(Sum(DISTINCT Hours1) - Sum (Hours2)<0,0,Sum (DISTINCT Hours1) - Sum (Hours2))
m w, thank you for the answer. That fixed some extra brackets in the attached example. But this still doesn't solve the issue. e.g.: Process A has 5 Hours2 and 4 Hours1 - Only Hours2 are shown. I need to show both Hours2 and Hours3
I thought that Hours 3 by definition in your expression was zero.
If you don't want Hours3 to be negative and you don't want it to be zero, what do you want it to be?
No. My expression is incorrect (it was a workaround based on the assumption that the difference will always be positive). But what I want to show is Hours2 and Hours3 stacked.
If you want Hours3 to always be positive, you can wrap it in the fabs() function:
fabs(Sum (DISTINCT Hours1) - Sum (Hours2))