Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

homersimpson
Contributor II

How to get only 2 values in a bar chart from a lot of values?

Hi,

for an example i use a table like this:

StoreProduct
MunichHandy
CologneTV
BerlinPC
Munich
Munich
MunichXBOX
Berlin

Now i want to create a bar chart wich shows the number of Stores wich have a value in product and not.

Can i do this by a chart expression or only by (load) script?

regards,

sam

1 Solution

Accepted Solutions
homersimpson
Contributor II

Re: How to get only 2 values in a bar chart from a lot of values?

I did it by script:

Load

Store,

if(Product like '','Empty','Value')) as [Product Value]

from...

Bar Chart:

Dimension: [Product Value]

Measure: Count(Stores)


regards,

sam

3 Replies
MVP
MVP

Re: How to get only 2 values in a bar chart from a lot of values?

Would Munich and Berlin be included in both with and without value in product?

homersimpson
Contributor II

Re: How to get only 2 values in a bar chart from a lot of values?

Yes,count each store and show the number of stores with value in product and number of stores with no value in product.

homersimpson
Contributor II

Re: How to get only 2 values in a bar chart from a lot of values?

I did it by script:

Load

Store,

if(Product like '','Empty','Value')) as [Product Value]

from...

Bar Chart:

Dimension: [Product Value]

Measure: Count(Stores)


regards,

sam

Community Browser