Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

End Line at last month/year of data

I have a line chart with 3 years of data.  The years 2014 and 2015 are full years.  The year 2016 only has data through July. 

Do I want the line for 2016 to stop at July and not drop down to 0 for the rest of the year.

Not sure how to accomplish this.

This is the expression I was trying.  I hard coded the month just to see if it would work.  It didn't.

Sum({<Year={'2016'},Month={"<=7"}>}MEDARev)

8 Replies
sunny_talwar

How about this:

If(Sum(MEDARev) > 0, Sum(MEDARev))

rittermd
Master
Master
Author

That did not work.  I replaced your suggestion and it messed up all 3 lines.

sunny_talwar

, Would you be able to show what happened when you used this expression?

rittermd
Master
Master
Author

Capture.PNG

rittermd
Master
Master
Author

If 2016 is the only line in the chart then it stops at July.  When I add another year then it continues to December but shows zero for Aug - Dec.

sunny_talwar

Would you be able to share a sample?

Anonymous
Not applicable

Hi

try this

Dual(If(month=min(month), Year, ' '),  Sum(MEDARev))

rittermd
Master
Master
Author

This expression returns no line at all.

If I change it to > or < then I get the same line as before.  Number through July and then drops to 0 for the rest of the year.  I just want it to stop at July.