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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression in straight chart

Hi!

I have created a straight chart using the following data:

ProjectIDProjectStatusDate
123456Started2014-01-01
123456Underway2014-02-01
123456Finished2014-03-01
234567Started2014-02-01
234567Underway2014-03-01

What I want to do is, I want this chart to show only ongoing Projects, in this case ProjectID 234567.

Labels (1)
1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

Try this way

Tab1:

LOAD

ProjectID,ProjectStatus,

Date#(Date,'YYYY-MM-DD') As Date;

Load *Inline

[

ProjectID,ProjectStatus,Date

123456,Started,2014-01-01

123456,Underway,2014-02-01

123456,Finished,2014-03-01

234567,Started,2014-02-01

234567,Underway,2014-03-01

];

Left Join

LOAD

ProjectID,

Concat(ProjectStatus,',') as Details

Resident Tab1 Group By ProjectID;

And on the front end

Dim1:-  ProjectStatus

Dim2:-  Date

Dim3:-  Details

Expre:- =if(Details = 'Started,Underway', ProjectID)


project.png

Regards

Anand

View solution in original post

6 Replies
anbu1984
Master III
Master III

Check this app

its_anandrjs
Champion III
Champion III

Hi,

Try this way

Tab1:

LOAD

ProjectID,ProjectStatus,

Date#(Date,'YYYY-MM-DD') As Date;

Load *Inline

[

ProjectID,ProjectStatus,Date

123456,Started,2014-01-01

123456,Underway,2014-02-01

123456,Finished,2014-03-01

234567,Started,2014-02-01

234567,Underway,2014-03-01

];

Left Join

LOAD

ProjectID,

Concat(ProjectStatus,',') as Details

Resident Tab1 Group By ProjectID;

And on the front end

Dim1:-  ProjectStatus

Dim2:-  Date

Dim3:-  Details

Expre:- =if(Details = 'Started,Underway', ProjectID)


project.png

Regards

Anand

MK_QSL
MVP
MVP

Create a Straight Table

Dimension

1)

Calculated Dimension

=Aggr(IF(SubStringCount(Concat(DISTINCT ProjectStatus,'|'),'Finished')=0,ProjectID),ProjectID)

2) ProjectStatus

3) Date

Expression

1

Go to Presentation Tab and Hide the Expression Column

its_anandrjs
Champion III
Champion III

Hi,

Or another without creating any field in the load script try this

On straight chart

Dim1:- =Aggr(if( Concat(ProjectStatus,',') = 'Started,Underway',ProjectID),ProjectID)

Note:- Suppress When Value is Null  selected here

Dim2:- ProjectStatus

Expre:- Date

Regards,

Anand

Not applicable
Author

Thank you!
This might work for my app,

Is there a way of making the ProjectID showing distinct?

its_anandrjs
Champion III
Champion III

Use DISTINCT key word otherwise i thing not required, if got the answer please close the thread with appropriate answer.

Regards,

Anand