Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have this nested if statement as measurement to show what type of product is .
I searched community, seems since without aggr function, it only returns value; but I need a result of dimension.
so how I work with aggr to convert this into a result of dimension?
if(vGP%forProfile > vGP% and vMS% > vMKT%, 'A',
if(vGP%forProfile > vGP% and vMS% < vMKT%, 'B',
if(vGP%forProfile < vGP% and vMS% > vMKT%, 'C')))
We may aware, If you can define the variable what it do? Please share your variable expressions as well.
hi Anil,
I am so happy with your asking, you know what ....I can NOT get set expression work as I expect by using vGP%forProfile and vMS% ( I post like this way is to simplify my question)
for some reason as long as I use created variable, it just does not work. I end up using the original formula. But I guess this is another question. but if you could shred some lights on it, much appreciated. and master measure seems not work either unless I missed something.
so vGP%forProfile:
GP/Net Sales
vMS%:
$< [Company]={'US'},Date={'$(=max([Date]))'} >} [UNITS] ) /
Sum( {$<[Company]=,Date={'$(=max([Date]))'} >} [UNITS])
vGP% and vMKT% are numbers I manually set
I am now getting good result with that product type but not a ideal result as dimension. I want to have that magnifier logo at the table so that users can filter and search what they want.
thanks
What If, you are defining this way simply?
Aggr(Your expression, Dim1, Dim2)
what Dim1 and Dim 2 refer to here ? 'A', 'B', 'C' ? those product type I want to categorize ?
just wanted to add that ‘A’, 'B' , 'C' ,'D' (product type) are not data at my dataset.
I just wanted to use if statement to give those products ( those are at my dataset) new different category names.
do you think I need to create a mastered dimension or variable for those A, B, C, D to make the formula work?