Forum Discussion
Opening Balance calculation before the selected Date
Hi,
I have calculated opening balance as before the minimum date from the selected range. I am trying to display those transactions in a table. The PBIX link is below.
Opening Balance DAX before selected period
Please help
Regards,
Jay
Hi, jayadevan_v ;
You could create a new table without the SLData table.
New = VALUES('SLData'[DocumentDate])Then create a measure.
Measure = var _value= IF(MAX('New'[DocumentDate])<MIN('SLData'[DocumentDate]),CALCULATE(SUM('SLData'[Amount]),FILTER(ALL('SLData'),[DocumentDate]=MAX('New'[DocumentDate])&&[BranchName] in VALUES(SLData[BranchName])))) return IF(ISINSCOPE('New'[DocumentDate]),_value,[OpBal])The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-yalanwu-msftCommunity Support
Hi, jayadevan_v ;
You could create a new table without the SLData table.
New = VALUES('SLData'[DocumentDate])Then create a measure.
Measure = var _value= IF(MAX('New'[DocumentDate])<MIN('SLData'[DocumentDate]),CALCULATE(SUM('SLData'[Amount]),FILTER(ALL('SLData'),[DocumentDate]=MAX('New'[DocumentDate])&&[BranchName] in VALUES(SLData[BranchName])))) return IF(ISINSCOPE('New'[DocumentDate]),_value,[OpBal])The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.