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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Plot daily max for specific values in field

I am having some difficulty building a line chart of daily max tablespace usage for specific databases. What I would like in my dashboard is a stack of line charts that each represent one database and it's tablespaces max memory usage from each day. There are actually many databases but they all have the same tablespace names associated with them. So each line chart should have 3 lines, one for each table each with one data point per day. And this data comes in every hour. My original idea was based on using a master calendar, which I set up and associated with the timestamps. But I couldn't wrap my head around the logic. Here is a representation of the data:

DB NameTimestampTableMem. Usage
AAA4/15/17 10:00Table 110
AAA4/15/17 10:00Table 215
AAA4/15/17 10:00Table 35
BBB4/15/17 10:00Table 120
BBB4/15/17 10:00Table 225
BBB4/15/17 10:00Table 330
............
AAA4/15/17 12:00Table 115
AAA4/15/17 12:00Table 220
AAA4/15/17 12:00Table 310
BBB4/15/17 12:00Table 115
BBB4/15/17 12:00Table 225
BBB4/15/17 12:00Table 335
............
AAA4/16/17 10:00Table 115
AAA4/16/17 10:00Table 220
AAA4/16/17 10:00Table 310
............

Thanks in advance!

1 Solution

Accepted Solutions
hector_munoz
Specialist
Specialist

OK Sam,

So, for chart 1:

  • First dimension (calculated): Date(Timestamp#([Timestamp], 'MM/DD/YYYY hh:mm'), 'MM/DD/YYYY')
  • Second dimension: Table
  • Expression: Max({<[DB Name]={AAA}>} [Mem. Usage])

, and for chart 2:

  • First dimension (calculated): Date(Timestamp#([Timestamp], 'MM/DD/YYYY hh:mm'), 'MM/DD/YYYY')
  • Second dimension: Table
  • Expression: Max({<[DB Name]={BBB}>} [Mem. Usage])

I would recommend you to create a date field based on Timestamp field in script...

Hope it serves!

Regards,

H

View solution in original post

5 Replies
hector_munoz
Specialist
Specialist

Hi Sam,

Could you, based on the shared example, create a simple table with the final desired result? So, we could (at least me) understand what you exactly need... ;-).

Regards,
H

Anonymous
Not applicable
Author

Sure,

Based on my example table I want 2 line charts each with 3 plot lines, one for each table. The value points for each plot line should only be the daily max, instead of the hourly information I am currently getting.

Chart 1:

AAA | 4/15/17 12:00 | Table 1 | 15

AAA | 4/15/17 12:00 | Table 2 | 20

AAA | 4/15/17 12:00 | Table 3 | 10

AAA | 4/16/17 10:00 | Table 1 | 15

AAA | 4/16/17 10:00 | Table 2 | 20

AAA | 4/16/17 10:00 | Table 3 | 10

Chart 2:

BBB | 4/15/17 10:00 | Table 1 | 20

BBB | 4/15/17 12:00 | Table 2 | 25

BBB | 4/15/17 12:00 | Table 3 | 35

I apologize I didn't include enough example data the get more than one plot value for each of BBB's table's. I hope that is enough info to make sense of what I am talking about.

hector_munoz
Specialist
Specialist

OK Sam,

So, for chart 1:

  • First dimension (calculated): Date(Timestamp#([Timestamp], 'MM/DD/YYYY hh:mm'), 'MM/DD/YYYY')
  • Second dimension: Table
  • Expression: Max({<[DB Name]={AAA}>} [Mem. Usage])

, and for chart 2:

  • First dimension (calculated): Date(Timestamp#([Timestamp], 'MM/DD/YYYY hh:mm'), 'MM/DD/YYYY')
  • Second dimension: Table
  • Expression: Max({<[DB Name]={BBB}>} [Mem. Usage])

I would recommend you to create a date field based on Timestamp field in script...

Hope it serves!

Regards,

H

Anonymous
Not applicable
Author

Brilliant!

It was all in the bracket/brace usage. I was close but I just don't have a strong enough understanding of where and when I should use the many different bracket/brace options.

Thanks for all your help!

Sam

hector_munoz
Specialist
Specialist

Thanks Sam! Glad to help you!