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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

Line Graph Help

Hey guys,

I have a line graph that I am trying to show items produced per month. Currently it only shows Jan through September because we haven't collected any data for the rest of the year (Oct, Nov, Dec). I was curious to see how I can get those months to show up anyways with no data collected so far. Here is the current formula I am using to show the total per month.

Sum({$<Program_Dash={'Mechanical Inspection'}, Status_Dash={'Completed'}, Year = {"$(=Year(FirstWorkDate(ConvertToLocalTime(Date(now()), 'GMT-05:00'),1,$(vHolidays))))"}>} Processed_Dash)

22 Replies
mostwanted123
Creator
Creator

Try this,

Temp_Calendar_Range:

LOAD

Num(Min(Date_Hash)) as MinDate,

Num(Max(Date_Hash)) as MaxDate

FROM [lib://Data files/OB_Summary_Data.xlsx];

LET vStartDate=Peek('MinDate', 0, 'Temp_Calendar_Range');

LET vEndDate=Peek('MaxDate', 0, 'Temp_Calendar_Range');

Calendar:

  LOAD * ,

Year(CalDate1) AS CalYear, // Standard Calendar Year

Month(CalDate1) AS CalMonth,// Standard Calendar Month

Date(CalDate1,'MMM') as CalMonthName,  // Standard Calendar Month Name

'Q' &'-'& Ceil(Month(CalDate1)/3) as CalQuarter; // Standard Calendar Quarter

LOAD

Date($(vStartDate) + IterNo() - 1) as CalDate1

AUTOGENERATE (1)

WHILE $(vStartDate) + IterNo() - 1 <= $(vEndDate);

Regards,

Pratik


joshrussin
Creator III
Creator III
Author

Alright, that script loaded, what do I use as my expression for the graph? I tried CalMonth and it just returned the sum of all data for Jan - Sept.

mostwanted123
Creator
Creator

In the expression,

Sum({$<Program_Dash={'Mechanical Inspection'}, Status_Dash={'Completed'}>} Processed_Dash)

Uncheck the 'Suppress Zero Values' in the Presentation tab.

Regards,

Pratik

joshrussin
Creator III
Creator III
Author

This is all I get under Presentation.

KPI_0233.jpg

mostwanted123
Creator
Creator

Sorry for the misunderstanding Josh.

I was suggesting this for QlikView.

For QlikSense, Go to Add-ons ---> Data Handling ---> Check Include Zero Values

Regards,

Pratik

joshrussin
Creator III
Creator III
Author

For the Dimension am I still supposed to use Month?

mostwanted123
Creator
Creator

Yes

joshrussin
Creator III
Creator III
Author

Here is my app if you'd like to take a look.

mostwanted123
Creator
Creator

As your data is only till Sept, it is generating months only till Sept and not showing Oct, Nov, Dec.

For this try,

vEndDate = Num(Date(Yearend(today()))); //instead of Peek('MaxDate', 0, 'Temp_Calendar_Range');

Regards,

Pratik

joshrussin
Creator III
Creator III
Author

I tried this and still only shows through sept.