Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression with WHERE clause

I am trying to create a chart with an expression where it retrieve results WHERE status is 'New' and 'Resolved'

..and other expression WHERE status is 'Closed'

I tried the following line of expression, but it shows other status.

=if([Status Description] = 'Closed',[Status Description])

Please assist

7 Replies
Anonymous
Not applicable
Author

Try like this:

= Count( if(StatusDescription='New',StatusDescription))

=Count( if(StatusDescription='Resolved',StatusDescription))

its_anandrjs

You can try with

If(Match([Status Description],'Closed'),[Status Description])


or check the supress when value null

its_anandrjs

You can also try with if i am understand your dimension.

If(Match([Status Description],'Closed') And Match(status,'New','Resolved') ,[Status Description])

simondachstr
Luminary Alumni
Luminary Alumni

Use Set-Analysis on the Expression (not Dimension) {<[StatusDescription]={'New',Resolved'}>}

Not applicable
Author

Hi

This would be used as a calculated dimension

=if([Status Description] = 'Closed',[Status Description])

else for an expression use=if(only([Status Description]) = 'Closed', only([Status Description]))

anyway if you want to make some count or sum on this status use the set analysis expression like

=sum({<[Status Description] = {'Closed'}>}  YourField)

best regards

Chris

Not applicable
Author

I am trying to group and Sum the results for two status and give them a new Status Name

New = 20

Resolved = 10

Closed = 5

This is what I am trying to achieve:

Closed = 5

Open = 30

Not applicable
Author

am trying to group and Sum the results for two status and give them a new Status Name

New = 20

Resolved = 10

Closed = 5

This is what I am trying to achieve:

Closed = 5

Open = 30