Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Formula error

Hello All,

I am having an issue in writing a formula.

Could you please help:

If([Résolution Time] > Interval#('4', 'hh')and([Résolution Time] < Interval#('10', 'hh')),Interval#('10', 'hh')) - Interval#('4', 'hh'),0)

I think I am not doing it correctly.

Actually i need a formula which states that if the [Résolution Time] is more than 4 hours and less 10 hours, it show as 6 hours in my Excess field and if [Résolution Time] is less than 4 hours it shows as 0.

Many thanks for your usual help.

Kind Regards,

Hasvine

11 Replies

Re: Formula error

What exact error are you getting? Will it possible to share a sample?

Best,

Sunny

Not applicable

Re: Formula error

the result shows 00:00 everywhere.

Re: Formula error

Give this a try and see what happens:

If([Résolution Time] > Interval#('4', 'h') and [Résolution Time] < Interval#('10', 'hh'), Interval#('6', 'h'), Interval#('0', 'h'))

Not applicable

Re: Formula error

doesn't work :-(

Still shows 00:00

Re: Formula error

Can you show what's the format of [Resolution Time]? Is it a timestamp or in hours field?

MVP
MVP

Re: Formula error

maybe

if([Résolution Time]>(4/24) and [Résolution Time]<(10/24), ....,  .....)

Not applicable

Re: Formula error

Screenshot.png

Above is the screenshot of my table.

The [Resolution Time] is [Résolution en HH/MM/SS] (I am in a french speaking country).

Re: Formula error

Try this:

If(Num(Interval#([Resolution Time], 'hh:mm:ss')) > Num(Interval#('4', 'h')) and Num(Interval#([Resolution Time], 'hh:mm:ss')) < Num(Interval#('10', 'h')), Interval(Interval#('6', 'h'), 'hh:mm:ss'), Interval(Interval#('0', 'h'), 'hh:mm:ss'))

Not applicable

Re: Formula error

Still same.. :-(

Community Browser