Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
craig157
Contributor

Value Difference between dates

Hi there,

Need help calculating out the below.

I have a table like below:

SerialConsum18/12/1717/12/1716/12/1715/12/1701/12/17
123456AT128008AABT35.4%37.9%37.9%41.0%42.7%
123456AT128007TERA88.1%89.4%92.1%93.0%93.0%
45012AREG8000ERAN10.0%10.0%10.5%11.1%12.3%

I need to calculate the difference between each date.

Example for line 1: (18/12/17) 35.4% & (17/12/17) 37.9% = 2.5% Difference.

But then I need to do this for every report date. So compare 18th& 17th, 17th&16th, 16th&15th and so on.

Once I've got the differences, I will then build a daily average.

Can anyone please advise?

Thanks

Craig

1 Solution

Accepted Solutions

Re: Value Difference between dates

May be like this

Column(1) - Before(Column(1))

7 Replies

Re: Value Difference between dates

May be like this

Column(1) - Before(Column(1))

craig157
Contributor

Re: Value Difference between dates

Hi Sunny,

Gave it a go but it's bringing back strange figures.

example data:

18/12/17    17/12/17  

69.0%        70.0%      

The result came through as 150!!

Re: Value Difference between dates

Would you be able to share a sample?

daveamz01
Contributor III

Re: Value Difference between dates

Hi Craig,

Something like this?

Regards,

David

craig157
Contributor

Re: Value Difference between dates

Hi Sunny, ignore my previous comment - I didn't realise there was some Unit Conversion for percentage I missed from my expression until I tested it outwith this particular project!

Thanks for your help, I had never heard of the Before / After Function before today!

Thanks,

craig157
Contributor

Re: Value Difference between dates

Thanks David! Extremely helpful!

Re: Value Difference between dates

You can check them here, if you have not already seen this

Missing Manual - Before() and After()