Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to filter a field on a bar chart using an If OR statement in expression editor. The field title is ActivityType, there are six different activities types. I want to filter on three of them. This is what I enter in the expression editor:
=if(ActivityType='Call' OR (ActivityType='Mailers' OR ActivityType='Drop-In', ActitityType)
This creates for the tress activity types, and a fourth bar that combines the value for all of the activities types. The legend shows on the three activity types that I filtered on. What do I need to do to exclude the fourth bar?
Hi
try like this
Dimension:
=pick(match(ActivityType,'Call','Mailers','Drop-In'),'Call','Mailers','Drop-In')
// suppress null value in this dimension
measure:
sum(Amt)
and then enable total in your bar chart. thanks
Regards,
Deva
HI,
Canyou please share the screenshot?
Maybe just this: =if(ActivityType='Call' OR ActivityType='Mailers' OR ActivityType='Drop-In', ActivityType)
Oh and more importantly don't include Nulls
Hi
try like this
Dimension:
=pick(match(ActivityType,'Call','Mailers','Drop-In'),'Call','Mailers','Drop-In')
// suppress null value in this dimension
measure:
sum(Amt)
and then enable total in your bar chart. thanks
Regards,
Deva
A little simpler
=If(Match(ActivityType, 'Call', 'Mailers', 'Drop-In'), ActivityType)
(and suppress null values)
The attached docx file shows the expression and the resulting bar chart. The gray at the top of each bar represents the other activity types. The legend does not include these activity types. How can I exclude them from the bars?
Exactly what I need. Thank you.
By not including nulls on the properties of that dimension
I hope this helps,
Luis
And as per your screenshot, the dimension seems to be Day