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

Comparison of two columns with progressive values ​​by month / year

Hello to all.


I have the following problem that I do not know how to solve.


I have the following table:


In the column, called"Fatturato Contabile Ivato Prog. 2012 (A)", I have the sales value of 2012 progressive:

if(ANNO_PROTOCOLLO = $(varPreviousYear),

    rangesum(above(

            sum({<TIPO={'C'},SCAD_ALLA_DATA={0},TIPO_RATA={S},GIORN_PROTOCOLLO={1},ESPOSIZIONE={'>=$(VarRangeValoreEspoMin)'},ANNO_PROTOCOLLO={$(varPreviousYear)}>} IMP_RATA)

            ,0,RowNo())

            )

,0)

In the column, called "Fatturato Contabile Ivato Prog. 2013 (B)", I have the sales value of 2013 progressive:

if(ANNO_PROTOCOLLO=$(varCurrentYear),

    rangesum(above(

            sum({<TIPO={'C'},SCAD_ALLA_DATA={0},TIPO_RATA={S},GIORN_PROTOCOLLO={1},ESPOSIZIONE={'>=$(VarRangeValoreEspoMin)'},ANNO_PROTOCOLLO={$(varCurrentYear)}>} IMP_RATA)

            ,0,RowNo())

            )

,0)

In the new column, called "Incremento Fatt. Progressivo", I need to apply the following formula:


((B)-(A))/(A)


The calculation must be done by comparing Mount/Year (Mese/Anno) 2013 with Month/Year (Mese/Anno) 2012


How can I do?


Thank you all for your attention.


1 Solution

Accepted Solutions
Not applicable
Author

Manuel,

1) In order to create simply YTD, I prefer modify the model:

http://community.qlik.com/docs/DOC-4821

2) you can use also above, if the two years are present:

column(3)/above(column(2), 12)

in order to avoid to type the whole expression again

Fabrice

View solution in original post

1 Reply
Not applicable
Author

Manuel,

1) In order to create simply YTD, I prefer modify the model:

http://community.qlik.com/docs/DOC-4821

2) you can use also above, if the two years are present:

column(3)/above(column(2), 12)

in order to avoid to type the whole expression again

Fabrice