Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
HI Matthias ,
I am not getting require could you please provide sample data and expected op of it.
Thanks,
Arvind Patil
Hi matt
you need to post a sample for the solution. To write an expression we need some sample data or app.
regards
Pradosh
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 | ||||
ProductCode | Sales | |||
A | 2 | |||
B | 3 | |||
C | 2 | |||
D | 1 | |||
A | 1 | |||
C | 5 | |||
Output Table | ||||
ProductCode | Sales | |||
A | 3 | |||
B | 3 | |||
X | 7 | (Sales of former product code C) | ||
Y | 1 | (Sales of former product code D) |
Check the attached.
Is this what you want?
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
];
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
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
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?
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
works like a charm - thanks again Pradosh!