Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, Please someone solve my query. I am not sure where i am missing the steps for generating IRR. I am strugling a lot for finding the right solution. Provided all the data below with calculations, tables. Thanks in advance.
In Excel, it's getting IRR for fund A is 3.11%, B is 46% and total IRR is 3.35%
Backend calcualtion
1) Running total =
2/5/2024 | B | 10000 | 0 | 0 | 0 |
3/5/2024 | B | 0 | 100 | 0 | 100 |
4/5/2024 | B | 0 | 50 | 0 | 50 |
5/5/2024 | B | 0 | 25 | 0 | 26 |
6/5/2024 | B | 0 | 500 | 0 | 502 |
7/5/2024 | B | 0 | 0 | 100 | -100 |
8/5/2024 | B | 0 | 0 | 0 | 0 |
9/5/2024 | B | 0 | 75 | 0 | 75 |
10/5/2024 | B | 0 | 0 | 250 | -250 |
3/5/2023 | A | 20000 | 0 | 0 | 0 |
4/5/2023 | A | 0 | 1000 | 0 | 1000 |
5/5/2023 | A | 0 | 45 | 0 | 45 |
6/5/2023 | A | 0 | 0 | 25 | -25 |
7/5/2023 | A | 0 | 26 | 0 | 36 |
8/5/2023 | A | 0 | 35 | 45 | -10 |
9/5/2023 | A | 0 | 100 | 0 | 100 |
10/5/2024 | A | 0 | 0 | 0 | 26 |
Solved! Go to Solution.
Hi, @Nagesh20
Maybe you can try to modify the DAX:
Total Cash_NAV =
VAR currentdate = Table1[Date]
VAR Currentfun = Table1[Fund]
VAR filter_table = FILTER(Table1, Table1[Date] <= currentdate && Table1[Fund] = Currentfun)
VAR runtotal = CALCULATE(SUM(Table1[Daily NAV]), filter_table) -- Running Total
VAR _maxdate_per_fund = CALCULATE(MAX(Table1[Date]), FILTER(ALLSELECTED(Table1), Table1[Fund] = Currentfun)) -- Calculate max date per Fund
VAR filter_table2 = FILTER(Table1, Table1[Date] = currentdate && Table1[Fund] = Currentfun) -- Matching date with Fund name
VAR Total = -SWITCH(TRUE(),
MAX(Table1[Date]) = _maxdate_per_fund, runtotal,
MAX(Table1[Date]) < _maxdate_per_fund, 0,
0
) + CALCULATE(SUM(Table1[Call]) - SUM(Table1[Distribution]), filter_table2) -- (-Ending NAV + Calls - Distribution)
RETURN
IF(Total = 0, 0.001, Total)
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Nagesh20
Maybe you can try to modify the DAX:
Total Cash_NAV =
VAR currentdate = Table1[Date]
VAR Currentfun = Table1[Fund]
VAR filter_table = FILTER(Table1, Table1[Date] <= currentdate && Table1[Fund] = Currentfun)
VAR runtotal = CALCULATE(SUM(Table1[Daily NAV]), filter_table) -- Running Total
VAR _maxdate_per_fund = CALCULATE(MAX(Table1[Date]), FILTER(ALLSELECTED(Table1), Table1[Fund] = Currentfun)) -- Calculate max date per Fund
VAR filter_table2 = FILTER(Table1, Table1[Date] = currentdate && Table1[Fund] = Currentfun) -- Matching date with Fund name
VAR Total = -SWITCH(TRUE(),
MAX(Table1[Date]) = _maxdate_per_fund, runtotal,
MAX(Table1[Date]) < _maxdate_per_fund, 0,
0
) + CALCULATE(SUM(Table1[Call]) - SUM(Table1[Distribution]), filter_table2) -- (-Ending NAV + Calls - Distribution)
RETURN
IF(Total = 0, 0.001, Total)
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi all,
Finally i found the solution for the below query using calculated column. Only one concern is left i.e. Ending NAV is taking based on max date in the date column rather than max date of the Fund (tried to figure out this mutliple times), resulting IRR error is getting for Fund C. Please someone fix this issue using colculated column than measure. I am almost close to the answer. Thanks in advance
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |