Forum Discussion
Jelena17
4 years agoNew Member
Calculating Opening and Closing Balance
Hi, Need your help with calculating opening and closing balance per period that user selects. We have a table as our visualization and columns are VendorName, Balance (DebitAmount - CreditAmount)...
- 4 years ago
Problem solved!
This function worked for uscalculate( sum(VendorLedgerEntries[DebitAmount]) - sum(VendorLedgerEntries[CreditAmount]), DATESBETWEEN('Calendar'[Date],blank(),min('Calendar'[Date])))
Jelena17
4 years agoNew Member
Thank you for answering,
This is the output with the measure you sent. Still doesn't work, my guess is because of MIN function, because it can't see the dates before selected date. Example: Selected 2020/1/1, and if we use MIN(selected date), there is no values before 2020/1/1 because our slicer filters the table.
Then we turned off interaction between slicer and table, but it is the same. We also tried getting value from slicer, our expected value is on card visualization (1/1/2020), with selectedvalue function.
Do you have any suggestions about what should we do next?
Again, thank you in advance!
ā
Jelena17
4 years agoNew Member
Problem solved!
This function worked for us
calculate( sum(VendorLedgerEntries[DebitAmount]) - sum(VendorLedgerEntries[CreditAmount]), DATESBETWEEN('Calendar'[Date],blank(),min('Calendar'[Date])))