Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
desertmatt
Contributor III
Contributor III

Display the Sum of sales of different product Nos. only for 2 specific product nos in table chart

Dear All,

since our team mixed up product numbers we need temporarily - till this is solved in the our main system - a Table chart report which shows sales for all products as per their product numbers - except for 2 items for which it should show the sales of the old product numbers - is this possible?

ProductANo. - Sum SalesProductA

ProductBNo. - Sum SalesProductBX

ProductCNo. - Sum SalesProductC

ProductDNo. - Sum SalesProductDY

ProductENo. - Sum SalesProductE

etc.

Thank you so much for your support/ideas

kind regards

Matt

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

Hi

find the attached. as you said it is temporary so i have not created an extra table but renamed the product for those product code.I have used match function to get the values you desired. check the calculated dimension in the table.please adjust that in your application.

regards

Pradosh

Learning never stops.

View solution in original post

9 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

HI Matthias ,

I am not getting  require could you please provide sample data and expected op of it.

Thanks,

Arvind Patil

pradosh_thakur
Master II
Master II

Hi matt

you need to post a sample for the solution. To write an expression we need some sample data or app.

regards

Pradosh

Learning never stops.
desertmatt
Contributor III
Contributor III
Author

Hello Arvind and Pradosh

thanks for trying - below the simple data and output format - it doesn't look complicated but I can't get it to work with:

If (ProductCode = 'X', Sum ({<ProductCode= {'C'}>}Sales))

   

DATA
ProductCodeSales
A
2
B3
C2
D1
A1
C5
Output Table
ProductCodeSales
A3
B3
X7(Sales of former product code C)
Y1(Sales of former product code D)
techvarun
Specialist II
Specialist II

Check the attached.

Is this what you want?

devarasu07
Master II
Master II

Hi,

The best way you can do the apply map using method1.

like below method

MapProd:

Mapping Load * Inline [

ProductCode,NewProductCode

C,X

D,Y

];

Data:

load *, ApplyMap('MapProd',ProductCode,ProductCode) as RevisedProductCode;

LOAD * INLINE [

   ProductCode, Sales,

    A,2

    B,3

    C,2

    D,1

    A,1

    C,5

];

Capture.JPG

Method2:

Data:

load *, if(ProductCode='C','X',

if(ProductCode='D','Y',ProductCode)) as RevisedProductCode;

LOAD * INLINE [

   ProductCode, Sales,

    A,2

    B,3

    C,2

    D,1

    A,1

    C,5

];

Thanks, Deva

pradosh_thakur
Master II
Master II

Hi

find the attached. as you said it is temporary so i have not created an extra table but renamed the product for those product code.I have used match function to get the values you desired. check the calculated dimension in the table.please adjust that in your application.

regards

Pradosh

Learning never stops.
desertmatt
Contributor III
Contributor III
Author

Thanks   Devarasu and Varun,

this looks good - but how can I use this mapping for ODCB link database data (not Inline load)? also there are thousands of product codes but I really need only these 2 to be mapped?

desertmatt
Contributor III
Contributor III
Author

Hi Pradosh

this looks promising! Will try with real data and come back.

As I think it will work I give you the correct answer anyways 😉

Thank you so much for your speedy help - this whole community is so helpful (matching the Qlikview product ;-))

Thank you again everyone great job!

kind regards

Matt

desertmatt
Contributor III
Contributor III
Author

works like a charm - thanks again Pradosh!