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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

How can I show zero values from the script

Is it possible to show zero values if the data is not presented in the back end??

For e.g

Jan 2015  300

Apr 2015  200

May 2015 100

So I want to show zero values for remaining months where data is not presented.

And for Last three months i.e Aug 2015,Jul 2015 and Jun 2015, the colour should be red.

i want to show this in line chart.

Please help me!!!

Its urgent!!!

Regards,

Kavita

22 Replies
sunny_talwar

Do you have a master calendar with the remaining months in the application?

avinashelite

use the combination of master calendar and join ...to populate the missing

gautik92
Specialist III
Specialist III

mastercalendar can do that

kavita25
Partner - Specialist
Partner - Specialist
Author

Yess... to generate the rest of the months I have used Master Calendar

sunny_talwar

Have you tried unchecking 'Suppress Zero Values' on the Presentation tab??? May be that will helps

Capture.PNG

kavita25
Partner - Specialist
Partner - Specialist
Author

I have tried everything in front end...

I am able to achieve zero values for the rest of the month from front end..

But Last three months values is not identified by red colour.

sunny_talwar

Here is an example:

Script:

Table:

LOAD MonthName(Date) as MonthYear,

  Value;

LOAD * Inline [

Date, Value

01/01/2015, 300

02/01/2015, 200

03/01/2015, 100

];

MasterCalendar:

LOAD MonthName(Date) as MonthYear;

LOAD * Inline [

Date

01/01/2015

02/01/2015

03/01/2015

04/01/2015

05/01/2015

06/01/2015

];

Straight Table

Dimension: MonthYear

Expression: =If(Len(Trim(Value)) = 0, 0, Value)

Output:

Capture.PNG

Suppress Zero-Values is unchecked:

Capture.PNG

HTH

Best,

Sunny

sunny_talwar

Here is the screenshot for a line chart with Black for monthsyears with data and red for monthyears with no data:

Capture.PNG

kavita25
Partner - Specialist
Partner - Specialist
Author

I want the red colour for last three months, not for zero values.

In ur attached example u have coloured to those values where its zero...