Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a category named TOOTHBRUSH, and i want to sum only the products that are equal to the brand AQUAFRESH and exclud the other products.
I have to do the same thing for the rest of produtcs.
Sum only products that begin with AQUAFRESH
Sum only products that begin with PARODONTAX
Sum only products that begin with PROGLASUR
Yes a set analysis (set expression) does not work in a load script only in the UI. So I suspect that you are trying to do this in a load script then?
So based on WildMatch() you could do this to categorize or make a grouping field:
Pick( Wildmatch( Nor , 'AQUAFRESH*' , 'PARODONTAX*' , 'PROGLASUR*' ) , 'AQUAFRESH' , 'PARODONTAX' , 'PROGLASUR' )) AS ProductGroup
Use a set expression instead:
Sum( {<Nom={'AQUAFRESH*','PARODONTAX*','PROGLASUR*'}>} Sales)
It's not working, I would really like to group all the produtcs that begin with AQUAFRESH for example to create a subcategory, it makes it easier then to sum the wanted products .
Hi
Try creating the master dimension or create seperate field in the scrpit
If(Wildmatch(Nor,'AQUAFRESH*','PARODONTAX*','PROGLASUR*')=1,'AQUAFRESH',
If(Wildmatch(Nor,'AQUAFRESH*','PARODONTAX*','PROGLASUR*')=2,'PARODONTAX',
If(Wildmatch(Nor,'AQUAFRESH*','PARODONTAX*','PROGLASUR*')=3,'PROGLASUR')))
Hope this helps
Thanks
Yes a set analysis (set expression) does not work in a load script only in the UI. So I suspect that you are trying to do this in a load script then?
So based on WildMatch() you could do this to categorize or make a grouping field:
Pick( Wildmatch( Nor , 'AQUAFRESH*' , 'PARODONTAX*' , 'PROGLASUR*' ) , 'AQUAFRESH' , 'PARODONTAX' , 'PROGLASUR' )) AS ProductGroup
Hi,
I did solve the problem, I created a new dimension named Subcategory in the data load editor with the help of Wildmatch.
The script : if(ProductRangeCode='TOOTHBRUSH' and WildMatch(ProductName,'*AQUAFRESH*'),'AQUAFRESH') as SubCategory