Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rittermd
Honored Contributor

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

Re: End Line at last month/year of data

How about this:

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

rittermd
Honored Contributor

Re: End Line at last month/year of data

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

Re: End Line at last month/year of data

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

rittermd
Honored Contributor

Re: End Line at last month/year of data

Capture.PNG

rittermd
Honored Contributor

Re: End Line at last month/year of data

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.

Re: End Line at last month/year of data

Would you be able to share a sample?

galax_allu
Valued Contributor

Re: End Line at last month/year of data

Hi

try this

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

rittermd
Honored Contributor

Re: End Line at last month/year of data

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.

Community Browser