Qlik Community

Qlik Sense Cloud Discussions

Not applicable

Need help with an Expression in a bar chart Using QlikSense Cloud

I have a bar chart where my Dimension is "Category" and my Measure is "Status"  Status can be 1 of 2 options, "Add" or "Delete".  I want my bar chart to display the total number of "Add" and the total number of "Delete" for each category side by side.  I know how to do it as a whole and then use the filters to select one or the other but I want to visualize them side by side as a comparison.  I have tried using the Expression editor to use a where clause but I don't believe it is supported.  Any tips or assistance would be appreciated.

1 Solution

Accepted Solutions

Re: Need help with an Expression in a bar chart Using QlikSense Cloud

Two options

1) Add Status as second dimension

Dimensions

1) Category

2) Status

Measure

Count(Status)

2) Add two expressions using set analysis

Dimension

Category

Measure

=Count({<Status = {'Add'}>} Status)

=Count({<Status = {'Delete'}>} Status)

4 Replies

Re: Need help with an Expression in a bar chart Using QlikSense Cloud

Two options

1) Add Status as second dimension

Dimensions

1) Category

2) Status

Measure

Count(Status)

2) Add two expressions using set analysis

Dimension

Category

Measure

=Count({<Status = {'Add'}>} Status)

=Count({<Status = {'Delete'}>} Status)

Not applicable

Re: Need help with an Expression in a bar chart Using QlikSense Cloud

Thank you so much.  Option 2 worked like a charm.  Thanks again

Employee
Employee

Re: Need help with an Expression in a bar chart Using QlikSense Cloud

Hello Steve,

As you see, Sunny is one of our star Qlik Community members, thanks Sunny for all your great contributions to the Qlik Community!

I would like to add to this discussion so you are aware of additional training material.

The expression Sunny provided such as:

Measure

=Count({<Status = {'Add'}>} Status)

=Count({<Status = {'Delete'}>} Status)

In case you did not know, is known as Set Analysis and is very powerful. If you would like to learn more about what this expression syntax can do, I suggest you take a look at this 2 part video series available here:

More videos available here:

New to Qlik Sense Videos

Just thought I would share, please let us know how you do.

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

Regards,

Michael Tarallo (@mtarallo) | Twitter

Qlik

Regards,
Mike Tarallo
Qlik

Re: Need help with an Expression in a bar chart Using QlikSense Cloud

Thanks for the kind words Michael

Community Browser