Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
In the example, I have a bar chart which calculates the difference in percentage of Qty per year. I need that the chart does not show the years who did not have Qty.
Regards.
Try this as script
Data:
LOAD Año, if(isnum(QtyF),QtyF) as QtyF, QtyM;
LOAD * INLINE [
Año, QtyF, QtyM
2005, , 3
2005, , 2
2006, , 6
2007, 4, 4
2007, 8, 2
2008, 9, 5
2009, 2, 1
2010, 3, 5
2011, 5, 3
2012, 5, 5
2012, 4, 6
2013, 1, 7
];
sum({<QtyF={'*'}>}) for the QtyF expression and (above( [QtyF])-[QtyF]) / above([QtyF]) for the Dif% expression
Try this as script
Data:
LOAD Año, if(isnum(QtyF),QtyF) as QtyF, QtyM;
LOAD * INLINE [
Año, QtyF, QtyM
2005, , 3
2005, , 2
2006, , 6
2007, 4, 4
2007, 8, 2
2008, 9, 5
2009, 2, 1
2010, 3, 5
2011, 5, 3
2012, 5, 5
2012, 4, 6
2013, 1, 7
];
sum({<QtyF={'*'}>}) for the QtyF expression and (above( [QtyF])-[QtyF]) / above([QtyF]) for the Dif% expression
Hi Gysbert.
Thanks for responding.
It does not work, keep looking the years without QtyF.
Any idea?. Thank you.
Regards.
Hi.
I'm trying to solve with setanalysis does not work.
I use the followingexpression: sum ({$ <Año={"=Año-1"}>} QtyF) but bringsthesumof the relevant yearand not the previous so I can calculate the percentage of difference.
Regards.
This works fine. Thank you very much.
Could you explain the meaning of the expression:
Sum ({<QtyF={'*'}>} QtyF)
especially how it works: {'*'}
Regards.
The {'*'} means all values. Nulls are not values so the years where QtyF doesn't have a value are excluded from the expression calculation and because of that also from the chart.