Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a distinct list to generate a multi line chart?

I've done some searching but unfortunately I don't  think I know the lingo associated with Qlikview well enough to find what I'm looking for on my own.

I have a table. This table contains a date and a "keyword".  There are 10 unique keywords. There are hundreds of dates with numerous reoccurrences of each keyword. For instance:

date, keyword

2014-05-27, apple

2014-05-27, banana

2014-05-27, apple

2014-05-27, orange

2014-05-27, orange

2014-05-27, mango

2014-05-26, mango

2014-05-26, apple

2014-05-26, etc

This goes on and on.

I'm trying to create a line chart with 10 lines, each representing the frequency of the keyword across the date range in the table.

I know I can create each of these lines using something like this:

=count ( {$<keyword={'apple')>} keyword )
  =count ( {$<keyword={'banana')>} keyword )

Each of these expressions equals one line on the chart.

However, I don't really want to have to manually define each of these keywords every time I get a new set of results to analyse which could contain completely different keywords..

Is there a way to generate all 10 lines using one expression? Sort of like a "For loop" in Python maybe?

Much obliged to anyone who can offer some guidance.

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Just use this field (keyword) as another dimension.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Just use this field (keyword) as another dimension.

Not applicable
Author

Ahh brilliant, so add the field "keyword" to the Used Dimensions pane, then add a new expression that's "=count(keyword)"?

I tried that, It looks pretty good to me.

I'm still trying to wrap my head around things.

Thanks so much Michael.