Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ruthie09
Contributor III
Contributor III

Add chart reference line in dd:hh:mm format

Hi.  I'm not even sure how to express my question in a way that would return search results so I figured I'd ask it here.

The ask:  How can I add a reference line to be positioned at 01:12:00 (a duration interval of 1 day and 12 hours) to the chart (see screenshot)?

Relevant info:  I have a chart that compares the average time it takes to resolve incident tickets where the duration is displayed as dd:hh:mm.  The formulas used to achieve that result are:

interval(avg({$<IncOpenedBySD = {'Yes'}> * $<IncAssignedToCompany = {"*CompanyA*"}>} IncTimeToResolve)/1440,'DD:hh:mm')

interval(avg({$<IncOpenedBySD = {'Yes'}> * $<IncAssignedToCompany = {"*CompanyB*"}>} IncTimeToResolve)/1440,'DD:hh:mm')

Those work great and produce the blue and purple bars shown in the image.  What I'm trying to do is chart the target duration of 1 day and 12 hours, so that users can see whether or not the companies are hitting above or below the target.  I have no idea what to enter in the reference line expression field.

Help?

Ruthie09_0-1613485731835.png

 

Labels (3)
1 Solution

Accepted Solutions
Ruthie09
Contributor III
Contributor III
Author

I got it!  I used some of what Nicole had and figured that since it was an interval, it must want a calculation.  So thanks to @Nicole-Smith for leading me in the right direction.

=interval#(2160/1440,'DD:hh:mm')

View solution in original post

7 Replies
Nicole-Smith

This should work:
=interval#('1:12','D:hh')

Ruthie09
Contributor III
Contributor III
Author

Alas, it did not.  It tried to put something in it and then it went away.

Nicole-Smith

Make sure you click the fx button to open the expression dialog, paste it in, then click OK.  I couldn't get it to "stick" either without opening the expression dialog.  I have checked that it works :

Nicole-Smith_0-1613489890016.png

 

Ruthie09
Contributor III
Contributor III
Author

It's still not "sticking". 😞  I almost always work in the big dialog box because I don't trust the field (and usually, my formulas are too big to see in the little field).

Nicole-Smith

My chart is the normal Qlik Sense Bar chart--I don't know what you're using because your options look different.  Can you try switching to the same chart as me?

Ruthie09
Contributor III
Contributor III
Author

When I use a regular chart, it does do what it should.

However, what I use are the VizLib extensions.  It didn't occur to me that it might require a different formula.  I can't switch to a different extension at this point.  The entire app is based on VizLib tools.

Any idea how to make it work using that extension?

Ruthie09
Contributor III
Contributor III
Author

I got it!  I used some of what Nicole had and figured that since it was an interval, it must want a calculation.  So thanks to @Nicole-Smith for leading me in the right direction.

=interval#(2160/1440,'DD:hh:mm')