Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combine dynamic en static data in QV object (line chart)

I want to supplement an object (line chart) with static data, with static data of before 2013. Is this possible? The expression that I use is (with data for 2013):

(sum (A Costs) + sum (Costs B))

/

(sum (TOTAL Costs B) + sum (TOTAL Costs))

This results is a line chart (in %) of various objects (hardware, software, staff, and other). Of 2012 and before that I only have static data in %. How can I combine the two?

HardwareSoftwareStafOther
200519%33%30%18%
200617%34%32%17%
200715%34%34%17%
200817%35%31%18%
200916%35%32%17%
201013%37%30%19%
201113%35%31%21%
201210%40%29%21%
5 Replies
Not applicable
Author

Wilfred,

You could load both sets of data into different tables, and create 2 different expressions for the chart

The first one for the historical data would run to 2013, and the second expression would continue from 2014.

If this does not help - can you post an example?

Richard

Not applicable
Author

For your second set of data, covering data 2012 and earlier, try this:

Dimension: Object (Hardware, Software, Staf, Other)

Expression: avg(static percentage)

Not applicable
Author

I am preparing an example for you.

Not applicable
Author

Here you go.

You should be able to convert for your own data.

The chart is tidied up by

 

You can see how the 2 expressions merge, if you alter the colours to same, and disable labels. (Chart properties-> expressions ->expressions as legend - uncheck )

Hope this helped.

Richard

Not applicable
Author

Thanks, this is successful (but not entirely to how I want it). I just want to use multiple components (hardware, etc), where now only 'Percentage' is being used. I would like to use hardware, software, and other staff. such as:

table: LOAD * INLINE [

     Year, Hardware, Software, Staff, Other

     2004, 0.3, 0.2, 0.4, 0.1

     2005, 0.3, 0.2, 0.4, 0.1

     2005, 0.3, 0.2, 0.4, 0.1

     2006, 0.3, 0.2, 0.4, 0.1

     2007, 0.3, 0.2, 0.4, 0.1

     2008, 0.3, 0.2, 0.4, 0.1

     2009, 0.3, 0.2, 0.4, 0.1

     2010, 0.3, 0.2, 0.4, 0.1

     2011, 0.3, 0.2, 0.4, 0.1

     2012, 0.3, 0.2, 0.4, 0.1

];

This is unfortunately not as it should be. See the example I've added when the components of hardware, software, personnel and other are added and also the added component 'Only(Hardware)' isn't working correct.

Important! I use the dimension 'ICT component' for the use of:

(sum (A Costs) + sum (Costs B))

/

(sum (TOTAL Costs B) + sum (TOTAL Costs))

Screenshot.png  is Screenshot2.png