Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I have Qlik sense report which shows number of treatment days between end and start dates in different departments. There can be many rows for one department. They are counted in sql query:
DATEDIFF
( DAY,
START_DATE,
ISNULL(END_DATE, GETDATE())
) AS NET_TREATMENT_DAYS
and then in front-end expression: Sum(NET_TREATMENT_DAYS).
But now I need gross treatment days (gross treatment days are calculated: END_DATE - START_DATE + 1. Therefore START_DATE and END_DATE is included.)
Any idea how to calculate this? Is it possible to calculate in front-end, or should I do that in sql query or in load script etc and how?
Thanks in advance!
Hey,
I figured out how to do this.
I got right numbers with front-end expression
Sum(NET_TREATMENT_DAYS + 1)
Could
Sum(NET_TREATMENT_DAYS) + Count(END_DATE)
make a trick?
Hey,
I figured out how to do this.
I got right numbers with front-end expression
Sum(NET_TREATMENT_DAYS + 1)