Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there qlikview community,
I am pretty new here and was wondering if I can calculate an additional object called Revenue. I have a data set in Excel which contains both the price and sold qualitities. It does not contain the Revenue as such (of course I can do it in Excel, but want to know if and how to do it in the script.
I tried : sum ([current Price]*[quantity]) as Revenue but with that I failed...
Thanks in advance for your help !
Rob
load
....
[current Price],
quantity,
[current Price]*[quantity] as Revenue,
...
from
yourexcel
load
....
[current Price],
quantity,
[current Price]*[quantity] as Revenue,
...
from
yourexcel
Test this!
Thanks very much sir !
I try to raise the bar a bit. The same file contains a new Price as well (so old and new Price). I also need to calculate the same quantities against the new Price in order to get the difference out.
Can that be added to the script as well ? It seems that the 2 items that will be combined into a new item must be underneath each other... I tried to duplicate the quantities and do the same math, but that trick did not work...
Can you help me with that one too ?
Rob
if I understand,
if I don't post some rows of your excel and the result you want
load
....
[current Price],
quantity,
[current Price]*[quantity] as Revenue,
...
[new Price],
[new Price]*[quantity] as [New Revenue],
([new Price] - [current Price])*[quantity] as [Revenue Diff],
.....
from
yourexcel
Hi Massimo,
It seems that this does not work. I believe there is a conflict if I use quantity twice?
How can I btw attach an Excel file, I can only add pics and Videos here...? Luckily my Status is rookie 🙂
I made a pic, just to keep going 🙂
I would require calculated fields for column G, H and I...
Hi Massimo,
It seems it gives a conflict.
This is what I would Need, calculated values for G,H,I.
As I cannot find the button to attach an Excel file, I made a pic of my Screen instead...
Made it, tried another time, missed out some [].
Cheers sir, you made my day !