Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Changing measure number formatting changes value

Hello everyone,

I am experiencing a strange issue.

I have calculated a measure that's like:

SUM(INTERVAL(EndingDate - StartingDate, 'h')) that should measure the sum, in hours, of the duration of some kind of processes.

No problems this far.

I then created some visualizations, for example a KPI: it shows me 9400.

Nice, but I'd like to show the separator of the thousands. So I edit the KPI, find the measure and change the formatting, changing if from "Automatic" to "Number".

Nice, now it should show me 9.400...nope. It shows me 391,67 that is 9400/24, it's changing it from hours to days.

Why does it so?
And how can I format the measure?
I've read https://help.qlik.com/it-IT/sense/September2017/Subsystems/Hub/Content/Scripting/FormattingFunctions... but it's not very intuitive.

Should I measure it in days, formatting it as number and multiply the measure by 24?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Maybe something like

num (   sum ( EndingDate - StartingDate ) * 24   , '#,##0' )

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Maybe something like

num (   sum ( EndingDate - StartingDate ) * 24   , '#,##0' )

Anonymous
Not applicable
Author

I tried changing to SUM(INTERVAL(EndingDate - StartingDate, 'd')) and it shows the same results.

I guess I'll have to use your formula...

Thanks

Anonymous
Not applicable
Author

If you want to use the Interval() function, then as that will be doing the formatting try putting the Interval() as outer part of your expression :

Interval ( Sum ( EndingDate - StartingDate ) , 'd' )

Anonymous
Not applicable
Author

It seems to cause no differences...