Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
thanhphongle
Creator II
Creator II

query combining differents fields from 2 different columns

Asset cost
Product
1000A
25000B
8000C
4000A
15000A
12000B
500B
13000A

Hello Community, I would like to sum up every cost which refers to their own product

The query should be like this

if product=A, then sum up every asset costs referring to product A. If product= B, then sum up every asset costs referring to product B and if product C sum up every asset costs referring to product C

Qlikview should give out the result in this form

Sum Asset Cost Product A
Sum Asset Cost Product B
Sum Asset Cost Product C
33000375008000

in german

Anschaffungskosten
Produkt
1000A
25000B
8000C
4000A
15000A
12000B
500B
13000A

Hallo Community, ich würde gerne aus der obigen Tabelle, überall wo Produkt A, B oder C vorkommen die Anschaffungskosten miteinander addieren.

Die Abfrage wäre,

Wenn Produkt= A, dann addiere alle Anschaffungskosten bzgl. Produkt A, Wenn Produkt= B, dann addiere alle AK bzgl. B, wenn Produkt=C dann addiere alle AK bzgl C

Qlikview soll die Ergebnisse später in Form eines Tabellendiagramms ausgeben.

Summe Anschaffungskosten Produk A
Summe Anschaffungskosten Produk BSumme Anschaffungskosten Produk C
33000375008000
32 Replies
Not applicable

When you create a message, in the upper right part you will see advanced editor.

Now you will see the attachment option below right.

Anonymous
Not applicable

Could you please send a part of your data or the app, so that I could resolve the issue finally.

thanhphongle
Creator II
Creator II
Author

if u could do this and give me some explanaton with it, it would be really amazing!

Not applicable

Hi, I´m a little bit unsure of what you are trying to achieve.

I´ve fixed your Set Analysis expression, but as QlikRajan said, Set Analyisis can't skip dimensional filtering inside a chart. To do this, you need to use TOTAL .

Attached you will find an example with expression Inv.zuordnung - TOTAL . In this case, the expression  SUM(Selling Price) is being filtered only by Category dimension inside the chart

thanhphongle
Creator II
Creator II
Author

i actually want to create 4 barcharts.

The first barchart should show me the sum for only "Festkontraktierte Verlängerung"

The second barchart the sum for only "36 Monate"

The third barchart the sum for only "48 Monate"

and the fourth for the sum of only "60 Monate"

Anonymous
Not applicable

I will work on it and get back to you shortly.

Anonymous
Not applicable

Hi Thanh:

I have created 4 different charts as per requirements. I created some of the fields in script and then with the help of set analysis and conditional dimensions created these 4 charts. Please find attached.

Let me know if this is what you were looking for.

thanhphongle
Creator II
Creator II
Author

Unfortunetly i can't load it into my script. maybe i'm just too stupid for it. but this is how i add ur solution into my script

scriptadd.jpg

but it shows me 3 errors....

1. Error

error1.jpg

2. Error

error2.jpg

3. Errorerror3.jpg

My origin script basically looks like this

Main script

basic1.jpg

Basisdaten script

basic2.jpg

could u may help me adding ur solution to my basic script?

thanhphongle
Creator II
Creator II
Author

could u help me out there?

Anonymous
Not applicable

I will get back to you shortly. I will work on this after my office hours.