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

Why is qlikview summing rows by itself?

I have a question I have this query:

VentasXSalesPerson:

SQL Select SOH.SalesPersonID as SalesPerson,sum(SOH.SubTotal) AS [VentaTotal] from Sales.SalesOrderHeader SOH

inner join Sales.SalesPerson as SS on SS.SalesPersonID = SOH.SalesPersonID

group by SOH.SalesPersonID;

Productos:

SQL SELECT  ass.[SalesOrderID]

      ,ass.[OrderQty]

      ,ass.[ProductID], pp.Name

  FROM [AdventureWorks].[Sales].[SalesOrderDetail] as  ass

  INNER JOIN Production.Product pp on  pp.ProductID = ass.ProductID;

And I want to see how many products each sales person made and the amount, but this is what I got:

Untitled.jpg

As you can see the sales Person 268 sold different products for example: 742, 741 etc... but it's summing all of them,

I attached the qv file so that you can help me.

1 Solution

Accepted Solutions
Alejandro_Hernández
Former Employee
Former Employee

you're missing a link between your sales and product tables

Untitled.jpg

View solution in original post

2 Replies
Kushal_Chawda

can you tell me what would be the exact total you require in this case?

Alejandro_Hernández
Former Employee
Former Employee

you're missing a link between your sales and product tables

Untitled.jpg