Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ShahbazovT
Contributor III
Contributor III

share of the amount in total

Hi experts. I need your help🙏

ShahbazovT_0-1606821189067.png

I want to create new column and to find share of LCY amounts on each balance sheet line. 

for example LCY / (LCY+FCY)  by gross loan portfolio 

                          LCY / (LCY+FCY)  by retail loan portfolio  etc

I checked this formulas but did not give the desired result:

Sum({<TRN_DT={"*2020-11-27*"},Currency={'LCY'}>} OUTSTANDING_BALANCE_LCY ) / Sum(Total {<TRN_DT={"*2020-11-27*"}>} OUTSTANDING_BALANCE_LCY )

LCY & FCY amounts are located in the same column

Please help🙏

 

 

Labels (1)
4 Replies
brunobertels
Master
Master

hi 

Try this 

before(Column(1))
/(before(Column(1))+Column(1))

ShahbazovT
Contributor III
Contributor III
Author

Thanks for the help Bruno.

Please, can you explain over the column name of my table?  I could not do that 

or it must be in this form  (before(Column(1)) / (before(Column(1))+Column(1)))

because the formula did not work in such a form

 

 

brunobertels
Master
Master

Hi , 

before sending you this formula i test it in one of my pivot table object in qliksense and it worked well 

I saw that you have 2 column in your pivot table and if I well understand your requirement you need to get the ratio of LCY on the sum of LCY + FCY. 

LCY is your first column so it is before(column(1)) and FCY is your second column so it column(1)

then your formula 

LCY / (LCY+FCY) 

firstColumn/ ( firstColumn + SecondColumn)

can be written like that : 

before(column(1)) / ( before(column(1)) + column(1) )

this formula won't work : 

(before(Column(1)) / (before(Column(1))+Column(1)))

So it work's for me but if I expand the dimension it does'nt work anymore 

 

Sorry we may search another solution 

 

 

ShahbazovT
Contributor III
Contributor III
Author

Dear Bruno,

LCY & FCY amounts are located in the same column.