Calculate XIRR

Ashish Mathur

New Member
Joined
Mar 10, 2013
Messages
40
Office Version
  1. 365
Platform
  1. Windows
Hi,

I would like to calculate XIRR in PowerBI Desktop using a measure. I have posted the question here as well. Using these DAX functions, i have made some progress but as you can observe, the inputs in the DATATABLE function are hard coded and i would like to replace those with measures that i have written.

Calculated table formula

Table 2 = DATATABLE("Period",DATETIME,"CF",CURRENCY,{{"01/11/1999",-1.41},{"31/01/2023",397.12}})

Measure

XIRR of shares = XIRR('Table2',[CF],[Period])

I get the correct XIRR result i.e. 26.41%

The modification that i wish to bring here is that i would like to replace the hard coded entries in the DATATABLE function with measures that i have written. I'd like

1. 01/11/1999 to be replaced with the measure [Purchase date of shares]
2. -1.41 to be replaced with the measure [Cost of shares (Rs. cr)]
3. 31/01/2023 to be replaced with the measure [Selected period]
4. 397.12 to be replaced with the measure [Market value of shares (Rs. cr)]

How can i do this?

Thank you for your help.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,223,367
Messages
6,171,669
Members
452,416
Latest member
johnog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top