Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculate xirr

Hi all Experts,

I am new to qlikview and I am trying to figure out solution to - How to calculate XIRR of a dynamic table.

The table gets updated by other parameters. so with updated table i have date and payments. I want to calculate XIRR using this date and payments column.

for reading a table i am using this code in vb script -

set table = ActiveDocument.GetSheetObject( "CH0001" )

w = table.GetColumnCount

h = table.GetRowCount

set CellMatrix = table.GetCells2(0,0,w,h)

for RowIter=0 to h-1

    for ColIter=0 to 2

   

        msgbox(CellMatrix(RowIter)(ColIter).Text)

    next

next

many many thanks.

5 Replies
marcus_sommer

It looked the same like Re: need help to update macro code.

- Marcus

Not applicable
Author

hello Marcus,

Can you help me further,

for xirr calculation i can use field name but here i have variable names,

so is it possible I can change variable names to field names somehow?

my motive is to calculate xirr which allows parameters as field names not variable name.

thaks a lot for ur reply.

marcus_sommer

For me it's not clear why the table should be transferred per macro into variables and then back again evaluated instead of taking these table itself to perform your calculations?

- Marcus

Not applicable
Author

how would u read a dynamic table without macro and the stored result will be in variable only, rit?

dats y im going by this approach. can u suggest me any other approach?

marcus_sommer

What do you mean with a "dynamic table". In general everything in qlikview is dynamic calculated on the fly depending on the made selections - and with the very powerful features of set analysis and/or aggr-functions you could very flexible trim the calculation like you want. Whereby quite often is it more suitable to precalculate some parts within the script-level to be able to use rather simply objects and expressions.

Therefore I suggest you create a small dummy-app with only a few very simple inline-data to get rid of the needed logic and syntax (without any macros).

- Marcus