Forum Discussion
Calculating Opening and Closing Balance
- 4 years ago
Problem solved!
This function worked for uscalculate( sum(VendorLedgerEntries[DebitAmount]) - sum(VendorLedgerEntries[CreditAmount]), DATESBETWEEN('Calendar'[Date],blank(),min('Calendar'[Date])))
Jelena17 , if date table is joined with posting date a measure like
calculate( sum(VendorLedgerEntries[DebitAmount]) - sum(VendorLedgerEntries[CreditAmount]), filter(allselected('Date'), 'Date'[Date] <= Max('Date'[Date])))
- Jelena174 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!
 
- Jelena174 years agoNew Member
Problem solved!
This function worked for uscalculate( sum(VendorLedgerEntries[DebitAmount]) - sum(VendorLedgerEntries[CreditAmount]), DATESBETWEEN('Calendar'[Date],blank(),min('Calendar'[Date])))