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

count the amount of item from other table

HI all,

I have two tables as per below. table 1 - information and table 2 - sales.  

table 1

NO details
A1 item 1
A2 item 2
A3 item 3
A4 item 4

 

table 2

No Amount
A1 1.55
A1 2.1
A2 1
A2 5
A3 3.6

 

expectation output:- (add column in table 1 )

NO details total sell
A1 item 1 3.65
A2 item 2 6
A3 item 3 3.6
A4 item 4 0

 

*Due to some reason both table are not associated.  Kindly advice to set expression 

6 Replies
Thiago_Justen_

Hi there, check this out:

[table 1]:

Load 

          NO,

          details

From YourBase;

 

Left Join([table 1])

Load 

          No as NO,

          Sum(Amount) as TOTAL

From YourBase

            Group By No ;

 

Regards

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Ravin1
Contributor II
Contributor II
Author

@Thiago_Justen_ hi, but the table cant be joined due to some reason. Any way to make it done? like, set expression?? 

Thiago_Justen_

@Ravin1 they'll be joined by same name column (NO). That's the why I renamed "No" field from table 2 to "NO".

Give a try and then call me again. It'll be a pleasure help you with this.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Ravin1
Contributor II
Contributor II
Author

hi @Thiago_Justen_ the table cant join due for some reason. These tables are simple only and the concept is the same. 

 

Thiago_Justen_

Are you able to take a screenshot with your script?

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Ravin1
Contributor II
Contributor II
Author

@Thiago_Justen_ do you have any other solution instead of editing the script?