Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
if i use a dimension in a chart and want to filter the values of the dimension, how can i do it?
Example
Dimension: Products
Filter: Name = "Samsung"
The chart should only show Products where "samsung" is found in the field name
regards,
sam
Create it as a master dimension as follow:
=if(Name='*Samsung*',Name,Null())
Example:
Hello! Let's say you calculate the sum of sales. Then your expression would be:
Sum({<Name={'*Samsung*'}>}Sales)
Hi,
yes, but how can i do it for dimensions?
regards,
sam
Create it as a master dimension as follow:
=if(Name='*Samsung*',Name,Null())
Example:
As suggested by the two , you can achieve by writing a calculated dimension and also using set analysis.
Hi,
You can also do it in script level where you can mention
if(upper(Products)='SAMSUNG','0','1') as ProductSpecificFlag
Later,you can use this in your calculated dimension,
if(ProductSpecificFlag='0',Products,Null())
This will take all values irrespective to any change in the cases of Samsung(upper case or lower case).
Hope it helps.
Thanks to you and the others.
I use like instead = because if i used = it shows 0 results.
=if(Name like '*Samsung*',Name,Null())
thanks and regards,
sam