Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
Not applicable

sum() with several parameters from different sources

Hi guys,

can you tell me: is it possible to sum(amount) with several parameters, with are from different sources?

like this:

Sales:

Load EntryNo as Key1,

     DocNo,

     Date,

     Amount,

     GlobalDim1,

     GlobalDim2

SQL SELECT* FROM X;

SalesPerson:

Load EntryNo as Key1,

     DimCode,

     DimCodeValue as Salesperson

     WHERE MATCH(DimCode,'Salesperson')

SQL SELECT * FROM Y;

SUM1:

Load DocNo,

     'DirectSales-AA' as SalesGroup,

     sum(Amount) as SUMSUM Resident Sales (AND RESIDENT Sales ?) Where (GlobalDim1<=500 AND GlobalDim1>=400) AND Match(Salesperson,'AA')


How I formulate like in SUM1 ?

thank you

Tags (1)
1 Reply
sasiparupudi1
Honored Contributor III

Re: sum() with several parameters from different sources

Try like this

Sales:

Load EntryNo as Key1,

     DocNo,

     Date,

     Amount,

     GlobalDim1,

     GlobalDim2;

SQL SELECT* FROM X;

left Join(Sales)

Load EntryNo as Key1,

     DimCode,

     DimCodeValue as Salesperson

     WHERE MATCH(DimCode,'Salesperson');

SQL SELECT * FROM Y;

NoConcatenate

SUM1:

Load DocNo,

     'DirectSales-AA' as SalesGroup,

     sum(Amount) as TotalAmount

     Resident Sales

     where (GlobalDim1<=500 AND GlobalDim1>=400) AND Match(Salesperson,'AA')

     group by DocNo,'DirectSales-AA';