Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
Creator III

Recommended Purchases

Trying to work out how to show what percentage of my recommended spares list my dealers are purchasing?

Example Rec List :

Reccomended Spares
FamilyPart NoDescTypeCar QtyRec Qty
Blue CarAB1A Part DescEngine52
Red CarAB2A Part DescWheels73
Green CarAB3A Part DescBodywork11
Red CarAB4A Part DescElectrical105
Blue CarAB5A Part DescEngine2215
Red CarAB6A Part DescWheels54
Green CarAB7A Part DescBodywork11
Red CarAB8A Part DescElectrical21
Green CarAB9A Part DescBodywork11
Red CarAB10A Part DescElectrical102
Blue CarAB11A Part DescEngine4010
Blue CarAB12A Part DescBodywork3020
Red CarAB13A Part DescElectrical52
Green CarAB14A Part DescElectrical74

Example Sales List

DealerDateMonthYearItemQty
Qual Cars22/11/2013Nov2013AB41
GG Cars05/10/2013Oct2013AB82
Autoland28/01/2013Jan2013AB111
Just Drive25/01/2013Jan2013AB132
Donands08/07/2013Jul2013AB12
Qual Cars22/12/2013Dec2013AB91
GG Cars20/07/2013Jul2013AB71
Autoland18/12/2013Dec2013AB22
Autoland18/06/2013Jun2013AB1410
Just Drive01/02/2013Feb2013AB31
Donands01/03/2013Mar2013AB109
Autoland04/08/2013Aug2013AB81
Just Drive09/05/2013May2013AB45
Donands07/09/2013Sep2013AB81
Qual Cars25/07/2013Jul2013AB1115
GG Cars09/04/2013Apr2013AB135
Autoland11/08/2013Aug2013AB136
Autoland16/07/2013Jul2013AB11
Qual Cars27/08/2013Aug2013AB91
GG Cars07/07/2013Jul2013AB71
Autoland15/08/2013Aug2013AB22
Just Drive13/10/2013Oct2013AB1412
Just Drive20/08/2013Aug2013AB32
Donands28/08/2013Aug2013AB106
Autoland23/08/2013Aug2013AB32
Donands24/03/2013Mar2013AB101
Qual Cars21/09/2013Sep2013AB85
GG Cars29/09/2013Sep2013AB43
Autoland26/10/2013Oct2013AB85
GG Cars24/05/2013May2013AB1160
Autoland03/10/2013Oct2013AB131

Required Output :

DealerPart NoBought QtyRec Qty% Purchased
AutolandAB11250%
AutolandAB1111010%
AutolandAB1372350%
AutolandAB14104250%
AutolandAB243133%
AutolandAB321200%
AutolandAB861600%
DonandsAB122100%
DonandsAB10162800%
DonandsAB811100%
GG CarsAB116010600%
GG CarsAB1352250%
GG CarsAB43560%
GG CarsAB721200%
GG CarsAB821200%
Just DriveAB1322100%
Just DriveAB14124300%
Just DriveAB331300%
Just DriveAB455100%
Qual CarsAB111510150%
Qual CarsAB41520%
Qual CarsAB851500%
Qual CarsAB921200%

Any direction on this?

Labels (1)
2 Replies
MK_QSL
MVP
MVP

Like This?

maxgro
MVP
MVP

It seems to me that if you rename [Part No] to Item you can use your two tables as they are and get the required output in a straigth table chart:

SCRIPT

[Example Rec List]:

LOAD Family,

     [Part No] as Item,

     Desc,

     Type,

     [Car Qty],

     [Rec Qty]

FROM

[http://community.qlik.com/thread/108643]

(html, codepage is 1252, embedded labels, table is @1, filters(

Remove(Row, Pos(Top, 1))

));

[Example Sales List]:

LOAD Dealer,

     Date,

     Month,

     Year,

     Item,

     Qty

FROM

[http://community.qlik.com/thread/108643]

(html, codepage is 1252, embedded labels, table is @2);

RESULT

expression are the last 3 cols

Sum ([Qty])

Sum ([Rec Qty])

column(1)/column(2)

DealerPart NoBought QtyRec Qty% Purchased
AutolandAB11250%
AutolandAB243133%
AutolandAB321200%
AutolandAB861600%
AutolandAB1111010%
AutolandAB1372350%
AutolandAB14104250%
DonandsAB122100%
DonandsAB811100%
DonandsAB10162800%
GG CarsAB43560%
GG CarsAB721200%
GG CarsAB821200%
GG CarsAB116010600%
GG CarsAB1352250%
Just DriveAB331300%
Just DriveAB455100%
Just DriveAB1322100%
Just DriveAB14124300%
Qual CarsAB41520%
Qual CarsAB851500%
Qual CarsAB921200%
Qual CarsAB111510150%