Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a chart with two dimensions Year1 and Year2, and I want to only show data points that fits certain criteria - like if Year1 > Year2 then show otherwise don't show.
Is this possible?
Thanks!
what you can do is enter the condition on each expression in the chart:
if( Year 1 > Year 2 , sum(Sales))
If you don't specify an 'else' condition it evaluates to NULL. If all the expressions evaluate to NULL the row is suppressed by default (presentation tab -> suppress missing)
What Jonthan said is true... but if you want to have Expression Total in Straight Table, use below little corrected expression...
SUM(IF(Year1 > Year2, Sales))
Also, as we have used if condition at Expression level, there is no NULL value would come....
Consider that we have below table at script.....Don't think much about the table..... it's for sample purpose only...
Load * Inline
[
Customer, Year1, Year2, Sales
A, 2011, 2012, 100
B, 2010, 2008, 200
C, 2014, 2014, 300
D, 2014, 2013, 220
];
Straight Table:
Dimension
Customer
Expression
SUM(IF(Year1 > Year2, Sales))
Another Way
Dimension
=IF(Year1 > Year2, Customer)
Expression
SUM(Sales)
Here we are going to get NULL for few Customers wherever the IF condition don't match... so you need to tick Suppress When Value is NULL in Dimension Tab...
Hope this helps...