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: 
Not applicable

Dynamically changing chart based on "snapshot" data question...

Hi,

I have been tasked to create an application in QV based on a report that currently exists in excel.

The excel has a line graph that is based on the chart below.  The data under the column 'Dec' is data from the current report/month.  The data under the other two columns, 'Nov' and 'Oct' are from previous months.  When the person runs this report for a new month, he simply moves December and November over to the right keeping the data intact, eliminates October, and creates a new column on the left for the new month(January).  January will have data from the current report now, whereas the data under columns Dec and Oct are from previous runtimes.

The row labels are a running 13 month.  So in February we will see February 2013 all the way down to February 2014.  In March we will see March 2013 all the way down to March 2014, all while the three columns shifting accordingly as detailed in the previous paragraph.  For now, ignore the W-W Trend column.

How can I simulate this in Qlikview?

I think/thought I am on the right track creating an Inline table and populating it with the data shown below.  I created the graph and it looked perfect.  But then next month, how can I simulate this dynamically/automatically for the new data ?

Table for Chart
W-W Trend DecNovOct
EvenJan000
EvenFeb111
EvenMar000
EvenApr111
EvenMay145
EvenJun378
EvenJul122224
DownAug367086
DownSep3976114
DownOct82176308
DownNov122408942
DownDec293950
UpJan1033
Up 162317151489

I know it sounds confusing, but its a running 13 month down the side, running 3 month across the top with the two far right columns being "snapshotted" or old data from previous reports.

Currently, I have no real code yet as Im trying to get my head around how this would work, if it can work.

Thanks!!!

7 Replies
Not applicable
Author

Thinking outloud here in response to my own question...

Is it possible to have some sort of variable automatically update the inline table when new data comes in?  I guess I can place filters on the report for the date ranges(whether or not people want to see running 3 months going across the top, 6 months or an entire year...give them more flexibility).

Thoughts?


Not applicable
Author

Hey Josh,

You mentioned you were getting this data from excel right. So as long as the data is updated in the excel for ever month as per the logic you mentioned then you would have to do nothing. Just keep reading that same table and you should be good. You shouldn't create an inline table because you wouldn't know what the data would be for Jan unless and until its updated in the excel. And then you would have to go and manually change the inline and keep doing this every month.So just directly access the excel and pull in the data.

Is there something else to it that I am missing?

thanks

AJ

MK_QSL
MVP
MVP

You can Create a Pivot or Straight Table with Dimensions as you wish....

Expressions :


For Current Month

Definition

SUM({<Month= {'$(=Month(Today()))'}>}Sales)

Label

=Date(Today(),'MMM-YY')

For Previous Month

Definition

SUM({<Month= {'$(=Month(AddMonths(Today(), -1)))'}>}Sales)

Label

=Date(AddMonths(Today(),-1),'MMM-YY')

And SO ON.......

This will give you Dynamic List of Months Required...

Not applicable
Author

Hi,

The table I provided is from an excel that some one puts together.  They put it together from raw data that I provide them(ticket data for problem cases in an IT environment).  I wouldn't be creating anything in QV based on the table that the person creates.  I would be creating the app based on the raw data.

But you are partially correct, maybe I am overthinking this.

I would just need a way to "snapshot" previous data..or a way to note that certain data are from previous runtimes.

I currently export the data from Business Objects...I suppose I could add in a column that shows the runtime date that will show for each record.

Again maybe I am overthinking this.  You got me wondering though

Not applicable
Author

I think I kinda understand your situation.

Why dont you use a filter while pulling in the data like

Table:

Load *

From DataBaseTable

where Month >= Addmonths(Month(Today()),-2)

This way everytime it will only pull in current three months of data.

Just a suggestion.

Not applicable
Author

The three month restriction for this graph is specific to this graph only.  The rest of the app will need to see data from any and all months.

I think I can skirt around the timeframe part of it.

I just need to be able to show in the graph that in the previous month I there were, for example, 100 tickets open.  Standing inside the month prior to THAT month there were 150 tickets open.  Snapshotted data.

The only way I think I can do this is have one master excel file.  Each runtime I add to the data starting at the first open cell.  Each new set of data will contain a flag for each record showing which runtime it came from...so I can group together prior months.

How does that sound?


Not applicable
Author

Thats a good idea. Just make sure the flag doesn't change for the already loaded data. Like for Dec data it should always say Dec and when reading Jan data the flag shouldn't reset the old data's flag to Jan, it should still say Dec and for the new one it should say Jan.

Make sense? Apart from that I think you should be good