Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sdepotter
Contributor
Contributor

merge 2 dimensions on X-axes in bar chart

Hi,

we have one Excel data file in which we have the personnel number, the startdate of employees and in another column the enddate of employees. we now use a calendar script to extract Year from both columns (i.e. startyear from the startdate field  and endyear from the enddate field).

Now we try to create a bar chart with "Year" on the X-axes. problem is that we have to choose either the year from the startdate or from the enddate. is there a way to combine this and just show year with per year two lines (one for the number of employees that started and one for the number that has left).

hope this is possible?

thx

Sam

4 Replies
jonathandienst
Partner
Partner

This will show how to load and use such data:

Canonical Date

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sdepotter
Contributor
Contributor
Author

Hi Jonathan,

I have followed your recommendation and tried below script. However, I get this error:

  Script line error:

  CALL CalendarFromField('Date', 'CommonCalendar', '')

Can't figure out what I'm doing wrong. Is it because the two date fields come out of one and the same datafile?

DateLink:

LOAD

    [Empl Nr],

    StartBarco as Date,

    'Start' as DateType

RESIDENT SAP_Personnel;

LOAD

    [Empl Nr],

    EndBarco as Date,

    'End' as DateType

RESIDENT SAP_Personnel;

CALL CalendarFromField('Date', 'CommonCalendar', '');

much appreciated

Sam

jonathandienst
Partner
Partner

Did you define the sub CalendarFromField or include the code that defines the sub?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sdepotter
Contributor
Contributor
Author

My apologies, don't believe I have. Can I find somewhere how to do this?

thanks

Sam