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: 
bartvanwetten
Creator
Creator

Difference from 2 columns in horizontal straight table

Dear all,

can you help me out on this challenge. Attached is a QlikView document with a horzizontal straight table.  Now column 3 should show the difference between the 1st and second but I can't get it right.

The correct numbers are in the excel screendump, shown in a text object.

I know the datamodel is worse, but the customer begged me for a solution in the expressions of the graphs.

Thanks in advance you all.

Bart.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

if(RapportCat='Begroting',

  sum({<PrognoseVersie={'$(vPrognoseVersie)'}>}Bedrijfskosten),

  if(RapportCat='Verschil'

  ,

      sum(TOTAL <RapportPeriode>{<RapportCat = {'Resultaat', 'Prognose'}>}Bedrijfskosten)

      +

      sum({<PrognoseVersie={'$(vPrognoseVersie)'}>}Bedrijfskosten)

      ,

      sum(Bedrijfskosten)

) )


Capture.PNG

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

bartvanwetten
Creator
Creator
Author

Hi Clever,

thanks for the reply but that gives me totals, not the difference.

But again, thx for the reply.

Bart

sunny_talwar

Try this:

if(RapportCat='Begroting',

  sum({<PrognoseVersie={'$(vPrognoseVersie)'}>}Bedrijfskosten),

  if(RapportCat='Verschil'

  ,

      sum(TOTAL <RapportPeriode>{<RapportCat = {'Resultaat', 'Prognose'}>}Bedrijfskosten)

      +

      sum({<PrognoseVersie={'$(vPrognoseVersie)'}>}Bedrijfskosten)

      ,

      sum(Bedrijfskosten)

) )


Capture.PNG

bartvanwetten
Creator
Creator
Author

Sunny T,

you made my day...AGAIN!

Regards,

Bart

Clever_Anjos
Employee
Employee

Just change the Total Expression to be a difference one