Forum Discussion
PaulGBG
5 years agoFrequent Visitor
Create date bins from a date variable
Hi, I need to set up a report that uses a date variable from a slicer input to show customer outstanding amounts as at the date selected, and also grouped in dates 31 days from that date variable...
- 5 years ago
Thanks for helping amitchandak
Actually I just resolved this myself. The filters are within calculate, so all I needed to do was add in:
VAR RunDate22 = min('As at Date'[Due Date])RETURNCALCULATE(SUM('Detailed_Customer_ledger_entries'[Amount_LCY]),(RunDate22 >= 'Detailed_Customer_ledger_entries'[Posting_Date]),(RunDate22 - 'Cust_LedgerEntries'[Due_Date])>31,(RunDate22 - 'Cust_LedgerEntries'[Due_Date])<63)
amitchandak
5 years agoSuper User
PaulGBG ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- PaulGBG5 years agoFrequent Visitor
Thanks for helping amitchandak
Actually I just resolved this myself. The filters are within calculate, so all I needed to do was add in:
VAR RunDate22 = min('As at Date'[Due Date])RETURNCALCULATE(SUM('Detailed_Customer_ledger_entries'[Amount_LCY]),(RunDate22 >= 'Detailed_Customer_ledger_entries'[Posting_Date]),(RunDate22 - 'Cust_LedgerEntries'[Due_Date])>31,(RunDate22 - 'Cust_LedgerEntries'[Due_Date])<63)