Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line chart 2 expressions

Hi All,

I have a line chart which has 2 dimensions right now:

1. date

2. types of queries (i only want 5 here.. insert, select, update, delete and create)

this graph gives me a total count of these different types of queries.

Now i want to extend this graph into showing me two lines. One which gives me a count of types of queries (which it already is) and the 2nd line should show me a total of all the queries (every type, not only limited to the 5 mentioned above).

I tried a lot of cominations, somehow i cannot get the 2 lines on the same graph.

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi,

I think of a set expression like:

=sum({<event = {'select'}+{'insert'}+{'delete'}+{'create'}+{'update'}>} daily_count)

to sum up all daily_count only for that type of events.

Alternatively, you could reuse your if statement of the calculated dimension of your other graph

sum (if(event=........, event))

See also attached sample (you got a trendline for total, I haven't touched that).

Regards,

Stefan

View solution in original post

4 Replies
swuehl
MVP
MVP

Hi,

maybe something like

=count( total <date> Queries)

?

You might add a {1} if you want to disregard selection also:

=count({1} total <date> Queries)

Could you post a screenshot? I am curious how a linegraph looks like with that kind of dimension then.

Regards,

Stefan

P.S:

At best, you could also post a small application demonstrating your problem, that almost ever helps to get a quick solution.

Not applicable
Author

So here is the app.

its got 3 graphs.

the graph on the right shows a total count of ALL the statement(query) types.

the 2 graphs on the left are:

1. all queries and their total

2. 5 specific query types and their total

So on the main grapdh (the one on the right - daily count), i want to have 2 lines:

1. showing total of all query types

2. showing total of selected 5 query types.

swuehl
MVP
MVP

Hi,

I think of a set expression like:

=sum({<event = {'select'}+{'insert'}+{'delete'}+{'create'}+{'update'}>} daily_count)

to sum up all daily_count only for that type of events.

Alternatively, you could reuse your if statement of the calculated dimension of your other graph

sum (if(event=........, event))

See also attached sample (you got a trendline for total, I haven't touched that).

Regards,

Stefan

Not applicable
Author

this works great!

thanks!