I was working through the Financial Reporting with Power BI Module and was not able to replicate the result of Previous Year Financials using a different formula.
The Logic behind the measure [Previous Year Actuals] in the module is
I tried achieving the same result [Actuals LY (,000)]
were [Actuals LY (,000)] is
However, I am not getting the same result using the measure.
If I have read the DAX right, the switch true statement is returning the correct results for totals because it is using the last year measure for those totals, it then defaults the the last years actuals measure, and that measure in your model is missing the date add part in the calculate statement so it doesnt roll back a year and change the date filter, so only those results appear wrong.
Thank you Kylie.
I did understand a part of it. However, we do have the measure [Actuals LY (,000) which already calculates the [Actuals (,000)] with the DateAdd.
Please also see the WIP Pbix file
FinReportingPBI.pbix (641.7 KB)
I think the construction of the calculate statement was playing with the context transition, it was applying a filter on a full table, is you amend the part in your version of the measure to the below, it seems to work, I think because calculate is then only clearing the income statement item with FILTER( ALL( ‘Income Statement’[Item] ), ‘Income Statement’[Item] = CurrentItem )
CALCULATE([Actuals LY (,000)],‘Income Statement’[Item] = CurrentItem)
That works!! Thank you for the detailed explanation.