Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
Below is a sample table for customer invoices. I have a calender table and would like to see the aging as of date using a slicer. Calculation of the buckets will be using the difference between the due date and selected date on the slicer. Already looked into the formus here but didn't exactly find what I need. If this has already been answered, please point me to the solution.
| Customer Code | Invoice | Amount | Due Date |
| PS-CR-1305 | INV00023 | 2,868 | 5/14/2023 |
| PS-CR-0238 | INV00024 | 14,065 | 2/15/2023 |
| PS-CR-0238 | INV00025 | 7,444 | 1/2/2023 |
| PS-CR-1220 | INV00026 | 8,066 | 12/29/2022 |
| PS-CR-0519 | INV00027 | 4,871 | 12/29/2022 |
| PS-CR-0791 | INV00028 | 1,686 | 12/23/2022 |
| PS-CR-0519 | INV00030 | 7,782 | 12/22/2022 |
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTEDVALUE('calender table'[Date])
return
DATEDIFF(_select,MAX('Table'[Due Date]),DAY)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTEDVALUE('calender table'[Date])
return
DATEDIFF(_select,MAX('Table'[Due Date]),DAY)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thi worked, Thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 6 | |
| 6 |