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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

Line graph help

Trying to create a line graph with the dimensions as months of the current year.

values being the result of the data from every month.

currently I have set the graph to this:

Dimension:

=[Date.autoCalendar.Month]

Expression:

=Sum({$<Status_Dash={'Completed'},Year = {"$(=Year(Today()))"}>} Processed_Dash)

Script:

LOAD

    Date_Dash,

    Month(Date_Dash) as Month,

    Num(Month(Date_Dash)) as MonthNum,

    Year(Date_Dash) as Year,

    MakeDate(year(Date_Dash)) as vCY,

    MakeDate(month(Date_Dash)) as vCM,

    Program_Dash,

    UOM_Dash,

    Status_Dash,

    Ave_Cost_Dash,

    Processed_Dash

The results I have for Jun is 130512 and July is 19286, but I need to show all 12 months. even though jan-may returns a 0

1 Solution

Accepted Solutions
joshrussin
Creator III
Creator III
Author

I reckon I was just overthinking it. I figured it out.

Dimension:

Month

Expression:

=Sum({$<Status_Dash={'Completed'}, Year = {"$(=Year(Today()))"}>} Processed_Dash)

View solution in original post

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Disable the Suppress Zero-values option on the Presentation tab and add  + sum({1}0) to your expression


talk is cheap, supply exceeds demand
joshrussin
Creator III
Creator III
Author

these are the options under presentationpresentation.PNG

sergio0592
Specialist III
Specialist III

I think you are in Sense, but gwassenaar refers to QlikView.

joshrussin
Creator III
Creator III
Author

I am using qlik sense

rubenmarin

Hi Joshua, you only have data for those consecutive months? In that case you'll need to create a calendar with dates at least for a year.

Calendar:

LOAD              

TempDate as Date_Dash,

Month(TempDate ) as Month,

// Other fields, remove from 'Script' table and set here;


LOAD

Date(MinDate + IterNo()) as TempDate

While MinDate + IterNo() <= MaxDate;

// or "AddMonths(MinDate, IterNo())" to generate only months


LOAD

YearStart(Min(FieldValue('Date_Dash', RecNo()))) as MinDate,

YearEnd(Max(FieldValue('Date_Dash', RecNo()))) as MaxDate

AutoGenerate FieldValueCount('Date_Dash');

joshrussin
Creator III
Creator III
Author

I reckon I was just overthinking it. I figured it out.

Dimension:

Month

Expression:

=Sum({$<Status_Dash={'Completed'}, Year = {"$(=Year(Today()))"}>} Processed_Dash)