Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

sales, excluding coming months!

I'm making a simple bar chart showing accumulated sales from current year compared to last year:

error loading image

For 2010 actuals im using the following formular:

Sum

({$<invLineYear={$(=Max(invLineYear))}>} NetAmount)

For 2009 actuals I'm using the following formular:

Sum

({$<invLineYear={$(=Max(invLineYear)-1)}>} NetAmount)

I would like to make the chart exclude 2010 actuals for the months ahead, so July, August, etc. are only showing 2009 actuals.

Any suggestions?

BR/ Lars

Tags (1)
3 Replies
MVP
MVP

sales, excluding coming months!

Hi Lars,

If you are not doing full accumulation, then set your month field in set analysis to be equal or less than the actual month

({$<invLineYear={$(=Max(invLineYear))}, invLineMonth={'<=$(Max(invLineMonth))'}>} NetAmount)


I personally prefer to flag the current year to date dates for all years in my application, so I would only accumulate for those values. But I guess this is more a design/display issue than an accumulation one, so you may change your bar background color to white or whatever your background color is if date is longer than today, on the [+] icon expanded in the Expressions tab.

Hope that helps

Not applicable

sales, excluding coming months!

Hi Miguel,

Thank you for your feedback.

I'm doing a full accumulation on the YTD figures, so the set analysis approach doesn't seem to work.

I've tried to make the background criterias, but it doesn't seem to work either (I'm a QlikView rookie, so poerhaps thats the reason :-). I've used the following formulas for the background color criteria:

=

if( invLineMonth > today(), RGB(255 ,0, 0),RGB(0 ,128, 0))



Any suggestions on what I'm doing wring?

/ Lars

brenner_martina
Valued Contributor II

AW:Re: sales, excluding coming months!

Hi,

Try the attribut expressin (in exoression the +-button) for Line style with an IF-statement: <wX> for width or <sX> for style!

Community Browser