Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

clauriayang
New Contributor

How to remove zero values from YoY line chart

Hi,

I have a line chart with YoY comparisons like this. Dimensions is month name. Measures are current fiscal year performance and last fiscal year performance.

Current Year:

if(GetSelectedCount(MonthYear)=1, sum({$<MonthYear=,FiscalYear=,FiscalYear={"$(=Max(FiscalYear))"},Date={"=$(=max(Date))"}>}Orders))

Last Year:

if(GetSelectedCount(MonthYear)=1, sum({$<MonthYear=,FiscalYear=,FiscalYear={"$(=Max(FiscalYear)-2)"}>}Orders))

Capture.PNG

I want to have the red line stops at Feb instead of showing the performance drops to zero since I don't have any data after Feb in 2018. I have tried unchecking "Include zero values" under data handling and unchecking "Include null values" under dimensions. Neither of them worked.

Can anyone help?

Thank you

4 Replies
YoussefBelloum
Esteemed Contributor

Re: How to remove zero values from YoY line chart

Hi,

try this on the current year expression:

if(GetSelectedCount(MonthYear)=1, sum({$<MonthYear=,FiscalYear=,FiscalYear={"$(=Max(FiscalYear))"},Date={"=$(=max(Date))"}, Month={"<=2"}>}Orders))


use the numeric month field

Digvijay_Singh
Honored Contributor III

Re: How to remove zero values from YoY line chart

May be this property is making it 0 -

Capture.PNG

clauriayang
New Contributor

Re: How to remove zero values from YoY line chart

This doesn't work

YoussefBelloum
Esteemed Contributor

Re: How to remove zero values from YoY line chart

Just verify that you put the correct Month NUM FIELD and NOT the Month CHAR FIELD on the set analysis.

Can you attach sample app ? or sample data ?

Community Browser