Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik Gurus,
How can I apply +/- sign for interval format (just like for numbers) ?
Thanks in advance.
M.
Where it should be, What you are going to have by end?
Please explain your requirement in detail, Preferably by an example.
Ok. I'm counting working time. Some components of the final balance can be positive or negative. So what I'd like to achieve at the end is something like that +14:34 or -02:22.
BR.
=num(54-48,'+#,##0;-#,##0') or =num(48-54,'+#,##0;-#,##0') check this
Hi Marcin,
Do you mean, if the filed name is test1, and there is a value "14:34" in it. And the output that you want is "+ 14:34"?
If not, could you please give some example data, and the results that you want?
Thanks
Aiolos
Hi Marcin,
Good Day.
Could you please provide an example as your query is not clear.
Hi Aiolos,
Exactly. As input I have number of hours let's say 245 then I convert it to days simply 245/24 =10,24 then I'm using function interval to display it as 10 05:45 (dd hh:mm) and what I'd like to have is + for positive values and - for negative like +10 05:45 or -05 02:34.
BR
M.
Hi Marcin,
I found a way to do that, hope that's what you want, you can see my example below.
But I think it may have better way to do that.
Thanks
Aiolos
try this on Aiolos sample qvw file
Dimension :ID
Expression:
if(Date1-Date2>0,
interval(Date1-Date2,'+D hh:mm:ss'),interval(Date1-Date2,'D hh:mm:ss'))