Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
guyvermeiren
Creator
Creator

Line chart accumulation

I have a line chart where I show 3 expressions and where the Period (Months 1 to 12) is the dimension.

However for the current Year I have no data available yet (Null) for the future months wich results in the "Accumulation" in a flat line which I don't want to show. (see picture)

Can I add a condition in a way that for the current year it only shows the line for the selected periods for the current year and the full lines for the other 2

Thanks,

Guy

4 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi Guy,

You can use a Set Analysis clause that only takes into account the past values and excludes the future ones.

Cheers

boorgura
Specialist
Specialist

You can have a condition on that expression alone like -

if(date < today(), <expression>)

you can replace today() with the max date - if they are different.

Let me know if it works.

guyvermeiren
Creator
Creator
Author

Thanks already, but I don't have an idea how to proceed. Assume that "Period" is my dimension.

guyvermeiren
Creator
Creator
Author

Hi Rocky,

I used the next expression:

=if(Period<Num(Month(Today())), Sum( {$<[Fiscal Year]= {$(=max([Fiscal Year]))},Period= {'*'} >} [Gross Sales ] ))


The calculation is correct but it doesn't change a thing to the line chart. Has this something to do with the fact that I use "Full accumulation". When I add a condition Null() or zero to my if-statement the complete line results in zero.

Is there maybe a way to format the line style as blank / invisible or set the the line color to blank ?

Kind regards,

Guy