Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have data like :
Now I want to merge the CATE to new category.
the new cate would be:
PPP=A,B,C
SSS=AA,BB,CC
DDD=AAA,BBB,CCC
Names(PPP,DDD,SSS) are not important I thiink, because I want to calculate,
how many vips buy only one new cate, how many vips buy more than one new cate.
The result should be:
I hope I have clarified what I want, and if you have any further question please feel free to contact me.
Thank you so much.
when you load your data do something like:
load
...
If(cate='A' or cate='B' or cate='C', 'PPP',
If(cate='AA' or cate='BB' or cate='CC', 'SSS',
If(cate='AAA' or cate='BBB' or cate='CCC', 'DDD',
'---'
)
)
) as myField
and use this new field as dimension
Hi,
You can create new CATE using below expression:
load
...
if(len(CATE)=1,'PPP',if(len(CATE)=2,'SSS','DDD')) as NewCATE,
...
...
HTH
Sushil
Hi Alessandro,
Thanks for your reply, but i want to finish it in dimension, not in script, do you have any idea to solve it?
Hi Sushil,
Could you have any idea to solve this in dimension, not in script?
Thank you for your reply.
use this
If(cate='A' or cate='B' or cate='C', 'PPP',
If(cate='AA' or cate='BB' or cate='CC', 'SSS',
If(cate='AAA' or cate='BBB' or cate='CCC', 'DDD',
'---'
)
)
)
as dimension, it works
I want to calculate,how many vips buy only one new cate, how many vips buy more than one new cate.
Not just output PPP SSS DDD, do you have any idea?
You can use the expressions given by Alessandro in a calculated dimension, but it is much more efficient to do calculations like this in the script.
I want to calculate,how many vips buy only one new cate, how many vips buy more than one new cate.
Not just output PPP SSS DDD, Could you please clarify how to do that using Alessandro's expressions?