Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hobanwashburne
Creator
Creator

Sequential calculations in QV

I do a lot of Access queries that build upon the previous step performed. A simple example would be Query1 sums the Total Sales of a given customer. Query2 sums the Total Sales of a given customer for each Product Line. Query3 divides the results of Query2 by the total calculated by Query1 to give the percent of each product line purchased by a customer. How would this look in Qlikview?

Query 1 output:

Cust       TotalSales

A             10,000

B             12,000

Query2 output:

Cust       ProdLine              Total Sales

A             X                             2,000   

A             Y                              8,000

B             X                             1,000

B             Y                              5,000

B             Z                              6,000

Query3:

Cust       ProdLine               Perc

A             X                             2,000/10,000 = 20%

A             Y                              8,000/10,000 = 80%

B             X                             1,000/12,000 = 8%

B             Y                              5,000/12,000 = 42%

C             Z                              6,000/12,000 = 50%

1 Solution

Accepted Solutions
bismart
Creator
Creator

Should have read the requirements first............... DOH!!!

View solution in original post

1 Reply
bismart
Creator
Creator

Should have read the requirements first............... DOH!!!