QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
See why Qlik was recognized for the seventh year in a row – and discover how we can help you tackle your data integration challenges. Get the report
cancel
Showing results for
Did you mean:
Contributor II

How to add calculated fields to a chart

Hi. It's my second day in qlik I'm trying to lear how to develop small reports in it.

My questions is the following:

How could I create something like this:

I have managed to do the first part: to get the data

But now i would like to do this calculation inside the chart.

Is this possible?

1 Solution

Accepted Solutions
Master

Hi Ionut,

It looks like you need a pivot table with one dimension (month number is it?) and seven expressions.

Use these expressions:

2015: Sum({\$<Year = {2015}>}Amount)

2016: Sum({\$<Year = {2016}>}Amount)

2017: Sum({\$<Year = {2017}>}Amount)

2017 vs 2016 % : (Sum({\$<Year = {2017}>}Amount) - Sum({\$<Year = {2016}>}Amount))/Sum({\$<Year = {2016}>}Amount)

2017 vs 2016 : Sum({\$<Year = {2017}>}Amount) - Sum({\$<Year = {2016}>}Amount)

2016 vs 2015 % : (Sum({\$<Year = {2016}>}Amount) - Sum({\$<Year = {2015}>}Amount))/Sum({\$<Year = {2015}>}Amount)

2016 vs 2015 : Sum({\$<Year = {2016}>}Amount) - Sum({\$<Year = {2015}>}Amount)

Drag the elements of the pivot table around so you get the month number dimension horizontal and the expressions a seven rows.

Good luck

Andrew

9 Replies
Specialist II

Hi Ionut, welcome!

Yes, It's possible.

If i correctly understood you need follow this steps:

1 - Drag a table to your chart

2- Select Dimension 1  (2016, i believe)

3 - Select Dimension 2 (2017)

4- Left Click on Dimension, but now click FX, that will open a editor expression, you can put all your expression.

Obs:

Instead step 4, you can add a measure, to get other options like SUM,MAX,MIN etc.

Glad you were on right platform

So, here consider it as all expressions in straight then enable horizontal option in presentation tab.. for percentage you need relative or should be in option enabled from number tab..

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Contributor II
Author

My Data comes from a table like this

This means that YEAR is a dimension - not the year value

So - I'm stuck here

Also - do you know of a document that shows how write expressions?

Master

Hi Ionut,

It looks like you need a pivot table with one dimension (month number is it?) and seven expressions.

Use these expressions:

2015: Sum({\$<Year = {2015}>}Amount)

2016: Sum({\$<Year = {2016}>}Amount)

2017: Sum({\$<Year = {2017}>}Amount)

2017 vs 2016 % : (Sum({\$<Year = {2017}>}Amount) - Sum({\$<Year = {2016}>}Amount))/Sum({\$<Year = {2016}>}Amount)

2017 vs 2016 : Sum({\$<Year = {2017}>}Amount) - Sum({\$<Year = {2016}>}Amount)

2016 vs 2015 % : (Sum({\$<Year = {2016}>}Amount) - Sum({\$<Year = {2015}>}Amount))/Sum({\$<Year = {2015}>}Amount)

2016 vs 2015 : Sum({\$<Year = {2016}>}Amount) - Sum({\$<Year = {2015}>}Amount)

Drag the elements of the pivot table around so you get the month number dimension horizontal and the expressions a seven rows.

Good luck

Andrew

Contributor II
Author

Cool, it worked! Thanks

Contributor II
Author

Yuhhu

I managed to do it dynamic

Master

Hi Ionut,

Nice - I originally started writing my suggestion with dynamic years but hardcoded instead because I thought it best to address only the question you posed and not add any complications.

Specialist II

Hi Ionut,

Sorry my delay, i saw that you solve your problem.

But anyway get this documento about set analisys

Contributor II
Author

Really cool, thanks!!