The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I am trying to create a financial calculation (XIRR) in PowerBI. To do so, I must first UNION together several calculated fields and other table results. The issue I am encountering is I can't see the results of the calculated, dynamic table before passing it into the XIRR calc. And the XIRR calc is not returning correct values so I need to see the dynamic table results first. How can I see the results of 'transTableFiltered' so I can see what the results are being passed into the XIRR calc? Thanks Dan
VAR transTable =
UNION(
--Get the beginning MV
SELECTCOLUMNS(BEGINDATE_TABLE,"TransactionDate",BeginDate, "Amount", [_XIRR_Leveraged_BeginAdjustedMarketValue]),
--Get any transactions during the period
SELECTCOLUMNS(IRR_TABLE,"TransactionDate", XIRR_Lookup[TransactionDate],"Amount", XIRR_Lookup[Amount_WithMultiplier]),
--Get the ending MV
SELECTCOLUMNS(ENDDATE_TABLE,"TransactionDate",EndDate, "Amount", [_XIRR_Leveraged_EndAdjustedMarketValue])
)
VAR transTableFiltered = FILTER(transTable, ISBLANK([Amount])=FALSE() && ISBLANK([TransactionDate])=FALSE())
Solved! Go to Solution.
Hey @dancarr22 ,
I use the DAX function TOJSON a lot to inspect the content of a virtual table when the measure is more complex. This article describes how TOJSON works: TOJSON – DAX Guide
Hopefully, this helps to tackle this challenge.
Regards,
Tom
Hi,
What happens when you click on New Table and put the formula there?
Thanks @Ashish_Mathur - I tried that but it is not 'dynamic' and does not update based on constantly changing parameters which is what is needed.
Hey @dancarr22 ,
I use the DAX function TOJSON a lot to inspect the content of a virtual table when the measure is more complex. This article describes how TOJSON works: TOJSON – DAX Guide
Hopefully, this helps to tackle this challenge.
Regards,
Tom
Thanks @TomMartens - this helps! I will review the JSON results and debug from there. Appreciate your help with this.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
78 | |
72 | |
46 | |
39 |
User | Count |
---|---|
135 | |
108 | |
69 | |
64 | |
56 |