Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find Cost in Table

Hi,
I have data which is given below format and I want to find out deleted and new assets between to months,
so table rows in red is deleted and in green is new assets in table
Asset idGroupCostMonth
12a1008/31/2012
13a2008/31/2012
14b3008/31/2012
15a2008/31/2012
16b1508/31/2012
12a1009/30/2012
13a2009/30/2012
50b6009/30/2012
51a7009/30/2012
16b1509/30/2012
This is my date selection from list
Current DateComparision Date
8/31/20129/30/2012
Requried out is given below:
GroupDeleted CostNew Cost
a200700
b300600
Total5001300
Please let me the expression for above requried output.
Regards,
Zain.
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

I'm not sure if this is what you need but see attached qvw.

I used alternate state on my 2nd list box (Comparison) to have 2 listbox selection from the same Field.

Regards,

Alex

View solution in original post

6 Replies
adhudson
Creator II
Creator II

Hi Zain,

     I suggest, to add column to indicate the previous asset id of the new asset id.

     Then it ll be easy for you to get the solution.

     Otherwise, tell me if the order of the rows are constant?

Regards

Andrew Hudson

Not applicable
Author

Thanks for your reply, I am already working on it through mapping and its almost done, but I want to know the possibility on expression level, Yes rows are constant on order by of Asset id and date.

Not applicable
Author

Hi,

I'm not sure if this is what you need but see attached qvw.

I used alternate state on my 2nd list box (Comparison) to have 2 listbox selection from the same Field.

Regards,

Alex

Not applicable
Author

Thanks you very much Alex, just let me know what is {alter1} ?

Regards,

Zain.

Not applicable
Author

I got it Alex you define Alternate State.

Regards,

Zain.

Not applicable
Author

Hi

I just named the alternate state I created as "alter1".

you can create your own in [Settings > Document Properties > General > Alternate States].

then on my second listbox which I named "Comparison" I selected alter1 under [General > Alternate State]

then on my pivot or straight table, my second expression is sum({alter1}Cost) which will force it to only react on my alter1 selection/s (which in this case is the selection I made on my Comparison Listbox)

Hope that explains it.

Regards,

Alex