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

separate product in different categories

Hi everyone,

i have a question concerning product categorization.

i use a connection to SAP BW and storing data in qvd files.

 

i want to do some categorization of products sold (for doing drill down) and need to separate one product called "24W" in two categories.

the categories mentinoned are not coming from my data source, so i did that in load script like:

 

IF(wildmatch(PRDCTH0CS,'24W'),'24h',
IF(wildmatch(PRDCTH0CS, '24W','24WZA','24WPRO'),'extended 24h','undefined category'
)) as FS_SubCategory,
    

 

in chart level i would like to adapt the amount of "24W" in category "24h" to have like 20% in there and the rest in category "extended 24h".

Does someone know how to do that?

 

when using the code stated above i only get data for product "24W" in the first category. In the seconds "24W" is not displayed at all.

 

thanks for any help!

 

br

chris 

Labels (3)
8 Replies
joseto00
Contributor II
Contributor II

Try this 

 

IF(PRDCTH0CS ='24W','24h',
IF( PRDCTH0CS = '24WZA' ,'extended 24h','undefined category' )) 

wlpike
Contributor III
Contributor III
Author

thanks, but this works if i don't need 24W displayed in "extended 24h".

i need to have a part of 24W in one category and another part of 24W in the other one.

joseto00
Contributor II
Contributor II

I'm sorry, I don't understand it well. Could you write a table with the possible values ​​and the result you want to get?

 

subcategory.png

wlpike
Contributor III
Contributor III
Author

The table would look like this.

Like descirbed in column E a part of product 24W should be added to subcategory1 and the other part should be added to subcategory2

hope it helps


table.JPG

joseto00
Contributor II
Contributor II

I understand that what you want to do creates a category based on the value of two fields ...

PRDCTH0CS ='24W'   -> Condition1 

NET =50   -> Condition2  ()   it can be any condition... "< 10/02/2018"   or  sales=1 ----

IF(PRDCTH0CS ='24W' and NET =50, '24h',
IF( PRDCTH0CS = '24W' and not NET =50 ,'extended 24h','undefined category' )) 

wlpike
Contributor III
Contributor III
Author

i see what you mean, but unfortunately there is no condition, on which i can differantiate 24W on those two categories.

what i had in mind to do the calculation is to manipulate first entry in category "24h" and do another manipulation for category "extended 24h".

so it would look like this, but it does not work

 

if(PRDCTH0CS = '24W' AND  FS_SubCategory = '24h' , sum(anz24W),sum(SALES_1R1)

 

and

"anz24W"

is a calulation of the measure from another QVD file (sales sum of PRDCTH0CS "24WZA"), by which i can seperate both categories.

 

 

joseto00
Contributor II
Contributor II

Okay, the only condition is 20% of the 24W product rows ...

20% rows 24W  subcategory-> 24 h

80% rows 24W subcategory-> extended 24h

 

The solution is to mark in the load script each row with a counter and sort it. Then concatenate 20% of the rows with 80 of the rows indicating the subcategory ... do you understand me ???

 

 

wlpike
Contributor III
Contributor III
Author

no, 20 % was an example only, sorry.

actually 24w should be the same amount like the sales sum of product 24WZA

in another sub-category 24W should be the sum of product 24EZA

and the rest of it should be 24W

 

do you know what i mean