cancel
Showing results for
Did you mean:
Frequent Visitor

## Opening balance problem in January month calculating retained earnings

I have 3 dax measures in balance sheet calculating Retained earnings of the current year:

1) Opening balance Retained earnings

2) Turnover (increase/decrease) Retained earnings of selected month

3) Closing balanse Retained earnings

For Opening balance I use YTD formula -1 period

For Closing balance I use just YTD formula
CALCULATE([Pelnas prieš mokesčius],DATESYTD(Kalendorius[Data],"12-31"),KEEPFILTERS(F_B[F/B1]="F"))

It works perfect except January month Opening balance returns previuos year December month.

My problem is to write if statement, which should behave by thuther logic:
if selected value in slicer is January then return value 0 ( or Blank()) else return Retained earnings YTD - 1 period.

My try:
Pelnas prieš mokesčius YTD -1 Month =
Var EBTrodiklis =
Return
if(ISFILTERED(Kalendorius[Data].[Month])="1",0,EBTrodiklis) =>does not work

Pelnas prieš mokesčius YTD -1 Month =
Var EBTrodiklis =
Return
if(SELECTEDVALUE(Kalendorius[Data])="1",0,EBTrodiklis) =>
=>does not work

Pelnas prieš mokesčius YTD -1 Month =
Var EBTrodiklis =
Return
if(month( =>not allows acces to calendar table

Super User IV

@Justas , if the closing balance is the end of the period then you can try closingbalancemonth, closingbalancequarter,closingbalanceyear - refer https://youtu.be/yPQ9UV37LOU

for opening, balance refer -https://youtu.be/6lzYOXI5wfo

Proud to be a Super User!

Announcements