I want to create a balance sheet in Power BI.
I have calculated a monthly value (column bedrag) in below screenshot. This works fine.
I also want to show a YTD column. The measure I use for this is:
YTD value 2022 = CALCULATE(TOTALYTD(SUM(_VW_FINANCIAL_REPORTING[bedrag]), Kalender[Date]))
As you can see in the screenshot below (column YTD value 2022) I can see values for periods 202203 and 202206. These periods have transactions for this line item. The rest of the periods, the YTD column stays empty.
However, I want to see the YTD value from 202203 for the months 202204 and 202205 as well. And then from 202207 on, I would like to see the YTD value from 202206.
If I use this function to ignore the period filter:
YTD value 2022 2 = CALCULATE(TOTALYTD(SUM(_VW_FINANCIAL_REPORTING[bedrag]), Kalender[Date]), ALL(Kalender[JaarMndNr]))
I get the total YTD value in each month (column YTD value 2). This is not correct.
Can anyone please let me know how I would be able to have the current YTD value in each row?