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: 
Anonymous
Not applicable

Expression In Script

I have the below expression in the chart properties and I would like to add in the scrip. Can someone show me the best approach?

Expression in Chart - count({<Status={[Pended]}>}distinct ID)

how would that look in the scrip? Can I use a IF Statement, this is what I have below...


    
Count(IF(Status= 'Pended','')) as TotalPends

Labels (1)
24 Replies
sunny_talwar
MVP
MVP

Does this look like what you want?

Capture.PNG

Script:

TEST:

LOAD *,

  1 as COUNTstatus,

  If(STATUS = 'PENDING', 1, 0) as COUNTPENDS;

LOAD * Inline [

ID, DESCRIPTION, STATUS

1, ONE, PENDING

2, TWO, APPROVED

3, THREE, PENDING

4, FOUR, DENIED

5, FIVE, PENDING

6, SIX, APPROVED

7, SEVEN, PENDING

];

Anonymous
Not applicable
Author

Yes but can we show a total in the stragiht table as well?

Total Count Status

Total CountPends

sunny_talwar
MVP
MVP

Here you go

Capture.PNG

Anonymous
Not applicable
Author

I appreciate you taking the time to help resolve my issue. That was painful for me, in the future I'll be more clear.

sunny_talwar
MVP
MVP

Don't worry, as long as we were able to work out a solution, its all good