Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following expression in Add Calculated Dimension
=if(CAPRAR='ST' or CAPRAR='SZ',STICKER,ITEM_ID)
how can i replace this command with another that not contains if command ?
I have problem with performance when i use the command if
Thank you in advance.
May be use set analysis instead of calculated dimension
Sum({<ITEM_ID = P({<CAPRAR = {'ST', 'SZ'}>})>}Measure)
Hello Sunny,
I have no measures, i use this expression in calculated dimension in order to display
the sticker or the item_id
Is this not in a chart? Can you elaborate on how you are using this? May be share a sample?
Yes this is in a chart in calculated dimension and in expression i have the command sum(sales)
Try this,
pick(Match([CAPRAR],'ST','SZ'),[ITEM_ID])
and Supress when value is null
You can't completely replace If condition instead you can use:
=if(Match(CAPRAR,'ST','SZ')>0,STICKER,ITEM_ID)
So try this, I guess
Sum({<ITEM_ID = P({<CAPRAR = {'ST', 'SZ'}>})>} sales)
I lose the STICKER, i want if the match is true to display STICKER else to display ITEM_ID
You could create a new field in your data model that contains a different field value depending on the value of CAPRAR. Then it simply becomes a matter of adding this new field as a dimension. The fit depends on the complexity of your data model.
Or you can leave the Calculated Dimension as-is and tackle the performance problems by adding a Calculation condition to empty the object as long as the number of rows is larger than an acceptable maximum. I guess no end user is eager to wade through straight tables containing 10000+ records.