Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two dimensions, for example dimension1 and dimension2, also value for example price.
I have to sum(price) where dimension1 is like dimension2, both value are similar. I would like to sum only this price where $(dimension1)=$(*dimension2*). So the text value of dimension2 is inside value of dimension1.
Is it posible ? If yes please help me with expression.
Thanks
Sylwester
Hi
The earlier posting is the right trackright:
=if(wildmatch(dimension1, '*' & dimension2 & '*'), sum(price))
Please dont waste time trying out set expressions. They cannot be used for a row by row comparison as they are only evaluated once for the table.
HTH
Jonathan
try using wildmatch
if (wildmatch($(dimension1), $(*dimension2*)) >=1 , sum(price))
Hi,
Use indirect set analysis
P() will help you.
Regards
The expression gives me "-" value.
Hi Sylwester,
Use if condition in Expression.
PFA. Hope this will help You.
Regards,
Joshmi
Something like this?
sum( {$<[dimension1] = P({1<[dimension1]={$(*dimension2*)}>})>}price)
It is not so easy, the dimensions are not equal, can be only similar, like
Green factory US and Green factory
Sylwester
Hi Sylwester,
I would do a wildmatch comparison between the two fields in the script and create a new field from that, flagging those which are 'similar'. You can then use the new field in your set analysis
hope that helps
Joe
Hi
The earlier posting is the right trackright:
=if(wildmatch(dimension1, '*' & dimension2 & '*'), sum(price))
Please dont waste time trying out set expressions. They cannot be used for a row by row comparison as they are only evaluated once for the table.
HTH
Jonathan
Hi,
Please try the below code
=Sum(if(FindOneOf(Dim1,Dim2)>0,Price))
Reagrds,
Joshmi