Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
suman_dhar
Creator
Creator

set analysis on line chart

in the line chart -if I want to click on open then list of records will dispaly on open condition and click on close then close records will diplay.

I want to do it using set anaylysis. Please help me construct the below expression.

IF( only(Status) = 'Open', sum( {<Status = 'Open'>} 1),  sum({<Status='Close'>} 1))

1 Solution

Accepted Solutions
PradeepReddy
Specialist II
Specialist II

in that case check the data once...

For those 7 tickets, the Trend_DT is NULL but the Trend_status is Close. That is the reason, why we are getting "-" instead of date in the lie chart as well.

If u don't want to showcase those records with Trend_DT is NULL, suppress those records.

View solution in original post

26 Replies
jsingh71
Partner
Partner

Can you share sample data.

suman_dhar
Creator
Creator
Author

ID

Opendt

Closedt

Status

188497

30/09/2015 14:54

30/09/2015 14:54

Closed

188423

29/09/2015 10:52

30/09/2015 16:08

Closed

188422

29/09/2015 10:50

30/09/2015 16:09

Closed

188420

29/09/2015 10:46

30/09/2015 16:09

Closed

188415

29/09/2015 10:14

30/09/2015 15:57

Open

188391

28/09/2015 15:07

28/09/2015 15:08

Open

188390

28/09/2015 15:06

28/09/2015 15:07

Closed

ishanbhatt
Creator II
Creator II

Hi  Suman Dhar,

If you are taking Status as List box for selection then below expression would be useful.

If(GetfieldSelection(Status)='Open',sum( {<Status = 'Open'>} 1),sum( {<Status = 'Close'>} 1).

Ishan Bhatt

jsingh71
Partner
Partner

See the attached file.

If your requirement is something else then let me know.

ishanbhatt
Creator II
Creator II

Hi  Suman Dhar,

If you are taking Status as List box for selection then below expression would be useful.

If(GetfieldSelections(Status)='Open',sum( {<Status = 'Open'>} 1),sum( {<Status = 'Close'>} 1).

Ishan Bhatt

aaryanqvdevelop
Creator
Creator

Hi,

try this

set the variable vStatus

SUM({<Status={=$(vStatus)}>}1)

jagan
Partner
Partner

Hi Suman,

Use Status as dimension and use below expression

=Count(ID)

Hope this helps you.

Regards,

Jagan.

stephenedberkg
Creator II
Creator II

IF( getfieldselections(Status) = 'Open', sum( {<Status = 'Open'>} 1), 

sum({<Status='Close'>} 1))

PradeepReddy
Specialist II
Specialist II

What is the dimension you are using for the chart..?

As of now, I can suggest

1) If you are using the status as dimension use Jagan's suggestion

2) If other dimension, take 2 expressions individually for each status and do a conditional enable

     sum({<Status={'Closed'}>}1 )   --> Conditional enable it as getfieldselections(Status)='Closed'

     sum({<Status={'Open'}>}1 )   --> Conditional enable it as getfieldselections(Status)='Open'

3) Otherwise take 2 dimensions, first one as Date field and second one as Status.

     Take expression as  Count(ID)