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

Insert value in pivot table

Hello,

I used three dimensions:

- Pull: T-shirt, Polo

- Color: Red, Yellow, Blue, Green

-CTC: size 5, size 7....

***The Pull = T-shirt & Color = Green did not have value but Pull = Polo & Color = Green had value as below

I need output template must have T-shirt with Green label as below (I tried all settings: Show All & Suppress, Populate Missing Cells....)

Any suggestion is much appreciate.

Thanks

   

V2.PullT-shirtT-shirtT-shirtNeed "Green" label here PoloPoloPoloPolo Grand Total
CTCColorRedYellowBlueTotalRedYellowBlueGreenTotal
size 5 1.01.01.00.03.01.03.01.01.06.09.0
size 7 2.02.02.00.06.00.00.0 0.06.0
size 8 2.05.05.00.012.00.0 0.012.0
size 9 2.02.04.00.08.00.0 0.08.0
size 98 1.01.01.00.03.0 0.03.0
size 100 2.03.03.00.08.02.00.02.02.06.014.0
Total 10.014.016.00.040.03.03.03.03.012.052.0
Header
1 Solution

Accepted Solutions
rupamjyotidas
Specialist
Specialist

In Script, you can add Color which are not available for CTC.

You can use the below code

InsertValue:

LOAD CTC,

     Color,

     Size,

     Qty,

     CTC&Color as Key

FROM

(ooxml, embedded labels, table is [Sample data]);

Temp1:

Load distinct

CTC,

Size

Resident InsertValue;

Join(Temp1)

LOAD * INLINE [

Color

Red,

Yellow,

Blue,

Green

];

Concatenate(InsertValue)

Load * where not Exists(Key);

Load Distinct

CTC,

Size,

Color,

CTC&Color as Key

Resident Temp1;

Drop Table Temp1;

View solution in original post

13 Replies
hemanthaanichet
Creator III
Creator III

Hi Thach

There is a option called suppress zero values try that option

Could provide some sample data?

Regards

Hemanth

Anil_Babu_Samineni

I am not sure, I understand fully? Would you let us know the output seems How?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Thank Hemanth. I already tried what you suggested but failed.

You can view sample data.

Sorry if my presentation was not clear.

  

CTCColorSizeQty
T-shirtRedSize 55
T-shirtYellowSize 52
T-shirtBlueSize 54
T-shirtRedSize 71
T-shirtYellowSize 73
T-shirtBlueSize 71
T-shirtRedSize 84
T-shirtYellowSize 82
T-shirtBlueSize 85
T-shirtRedSize 95
T-shirtYellowSize 91
T-shirtBlueSize 91
T-shirtRedSize 955
T-shirtYellowSize 953
T-shirtRedSize 1003
T-shirtYellowSize 1003
T-shirtBlueSize 1004
PoloRedSize 55
PoloYellowSize 51
PoloBlueSize 51
PoloGreenSize 52
PoloYellowSize 71
PoloBlueSize 75
PoloYellowSize 83
PoloYellowSize 93
PoloRedSize 1005
PoloYellowSize 1003
PoloBlueSize 1005
PoloGreenSize 1005
Anonymous
Not applicable
Author

Thank Anil, let's me clarify, see the below screenshot: Desired Pivot template.bmp

pathiqvd
Creator III
Creator III

Hi,

  Try Like This,

       Just Concatenate with above table in script level and in properties-->presentation--> disable suppress zero values

Concatenate

LOAD * INLINE [

    CTC, Color

    T-shirt, Green

];

rido1421
Creator III
Creator III

Hi Thach

Green Should be there automatically based on your sample.

could you post a sample qvw?

Anonymous
Not applicable
Author

Hi,

  Can you have a look the attached application

-Jai

Anonymous
Not applicable
Author

I like your idea. Thanks.

I tried but I did not show as I wish. Please review my sample .qvdDesired Pivot template-next.bmp

Anonymous
Not applicable
Author

I attach qvd file.

Please give some idea.