Forum Discussion
Deelip
Resolver I
1 year agoDynamic calculations based on the selected date
Hi All, I cannot think of an approach for my requirement on finding the outstanding amounts/number of days due based on the user selection. I have the following table and with the expected outp...
- 1 year ago
you can try this
Total AR =VAR _date=max('date'[Date])return sumx(FILTER(all('Table'),'Table'[Customer]=max('Table'[Customer])&&('Table'[Closed at Date]>_date||ISBLANK('Table'[Closed at Date]))),'Table'[Amount])not due =VAR _date=max('date'[Date])return sumx(FILTER(all('Table'),'Table'[Customer]=max('Table'[Customer])&&'Table'[Due Date]>_date),'Table'[Amount])1-30days =VAR _date=max('date'[Date])VAR _tbl=ADDCOLUMNS('Table',"days",'Table'[Closed at Date]-_date)return sumx(FILTER(_tbl,'Table'[Customer]=max('Table'[Customer])&&[days]>0 &&[days]<=30),'Table'[Amount])pls see the attachment below
ryan_mayu
Super User
1 year agoyou can try this
Total AR =
VAR _date=max('date'[Date])
return sumx(FILTER(all('Table'),'Table'[Customer]=max('Table'[Customer])&&('Table'[Closed at Date]>_date||ISBLANK('Table'[Closed at Date]))),'Table'[Amount])
not due =
VAR _date=max('date'[Date])
return sumx(FILTER(all('Table'),'Table'[Customer]=max('Table'[Customer])&&'Table'[Due Date]>_date),'Table'[Amount])
1-30days =
VAR _date=max('date'[Date])
VAR _tbl=ADDCOLUMNS('Table',"days",'Table'[Closed at Date]-_date)
return sumx(FILTER(_tbl,'Table'[Customer]=max('Table'[Customer])&&[days]>0 &&[days]<=30),'Table'[Amount])
pls see the attachment below