Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Gauge works on selection but not on the whole table

Hi

I have a gauge configured to show the average time to fix maintenance calls, I have event tried 2 different expressions:

=AVG([Maintenance TimeToFix])

=sum([Maintenance TimeToFix])/sum([Maintcon Count])

Both of these expressions work if I select a singular maintenance call record but not when no selection is made. Note both of these expressions work fine if I place them into a text box.

Any Ideas?

Thanks

Nick

1 Solution

Accepted Solutions
Not applicable
Author

I cannot share the app unfortunately but I think I know what the issue is so perhaps you can help?

I can select multiple records where the time to fix column is populated and the gauge works however when these selections include records where the time to fix is 00 the gauge figures are incorrect usually sets it to 0.00066 etc. even though it should read 20 days.

The format of the 'Time to fix' field is calculated like:

//Calculated Fields
Interval([$(vPrefix) Closed]-[$(vPrefix) Opened]) AS [$(vPrefix) TimeToFix],

The $(vPrefix) Opened field is a number field if this helps? Should I be using a different format?

View solution in original post

2 Replies
Chanty4u
MVP
MVP

can u share sample app? for this?

Not applicable
Author

I cannot share the app unfortunately but I think I know what the issue is so perhaps you can help?

I can select multiple records where the time to fix column is populated and the gauge works however when these selections include records where the time to fix is 00 the gauge figures are incorrect usually sets it to 0.00066 etc. even though it should read 20 days.

The format of the 'Time to fix' field is calculated like:

//Calculated Fields
Interval([$(vPrefix) Closed]-[$(vPrefix) Opened]) AS [$(vPrefix) TimeToFix],

The $(vPrefix) Opened field is a number field if this helps? Should I be using a different format?