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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

Gantt chart giving distinct value

Hi,

I have a gantt chart where I am taking jobname and job description as 2 dimensions and one expression that is

=max(endtime) - min(starttime)

I noticed there is one job which run twice so I am expecting two bars in the gantt chart, however it is showing only one bar. I want it to show two bars instead one .

If I take a table box and take same above 2 dimensions , it will give me two rows.

Please help me, what mistake I am doing here. How do I get two bars in the above gantt chart.

13 Replies
ashis
Creator III
Creator III
Author

Hi Jens,

Sorry for bothering you again and again. I am little confused where to put this autonumber. In my data model I do have one link table . My load script has following script.

Spike1:
LOAD Region &'|'& JobName as key,
Timestamp,
Diff,
//Jobname as JobName,
   DESCRIPTION,
System_ID,
DataFeedSystem_ID,
Job_Type_Descr,
Instance_ID,
EnrichGroupNumber,
EnrichGroupDescr,
Depth,
Start_Time,
End_Time,
Date,
TASKTYPE,
Instance
Resident  Spike;


Relationship1:
LOAD Region &'|'& JobName as key,
DependsOnTimestamp,
DependOnDiff,
//JobName,
   DependsON,
DependsON_Descr,
DependsON_Type,
//Start_Time as DependsOnStarttime,
   //End_Time as DependsOnEndtime
  
DependsOnStarttime ,
DependsOnEndtime
Resident Relationship;

Link:
LOAD
Distinct
Region &'|'& JobName as key ,
JobName as Temp_key,
Region,
JobName
Resident Spike;

Concatenate(Link)
load
Region &'|'& JobName as key ,
JobName as Temp_key,
Region,
JobName
Resident Relationship where not Exists (Temp_key,Region &'|'& JobName);

Drop field Temp_key from Link;

drop table Relationship;
drop table  Spike;

Could you please point out where to put your code . I guess it would be in the link table , then it is creating synthetic key.

ashis
Creator III
Creator III
Author

jensmunnichs
Creator III
Creator III

Hmm.. Is description always unique to a job name? As in, 2 different jobs can never have the same description?

In that case you could add RowNo() to the Spike table, then add the Autonumber function to Spike1, but with description instead of JobName in the function. I think that should work... But honestly, it's hard to tell without being able to try things in your full document.

You would have to use key as a dimension though, instead of JobName... would that be a problem?

EDIT: You could also try using the key in the autonumber function.

ashis
Creator III
Creator III
Author

Thank you Jens,

I am using rowno() in the spike table , which is the first table.

Temp1:
load *,
RowNo() as tmpEvent
Resident Spike;

Test:
NoConcatenate
LOAD *,
AutoNumber(tmpEvent, JobName) as Event
Resident Temp1;
Drop Field tmpEvent;

Drop table Temp1;
drop table Spike;

Hope this will work, I am so thankful to you for your guidance. You rock.