Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
craig157
Creator II
Creator II

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
sunny_talwar

May be like this

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

View solution in original post

7 Replies
sunny_talwar

May be like this

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

View solution in original post

craig157
Creator II
Creator II
Author

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!!

sunny_talwar

Would you be able to share a sample?

daveamz01
Creator III
Creator III

Hi Craig,

Something like this?

Regards,

David

craig157
Creator II
Creator II
Author

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
Creator II
Creator II
Author

Thanks David! Extremely helpful!

sunny_talwar

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

Missing Manual - Before() and After()