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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table with a date column Invoice Table (Invoice Id, Invoice Date, Invoice amount)...I need a new custom date attribute (say 'Effective Date') which will take input from the filter selection by user . Now I need to find the' Invoice_Age' . Which is the difference of Invoice Date from each record and Effective Date input. I am using Direct Query in Power Bi desktop.
Please suggest me right way to achieve this.
Details Updated:-
Invoice Table
I need to create a date attribute called 'Effective Date' that can take single date input from user from filter panel and use that date to calculate 'Invoice Age' and create a report as below. Also I need to use this Invoice Age to create some group bins .
If Effective Date selected by user from filter : 01-02-2023
Please suggest a solution for this complete requirement @Mahesh0016
@dhanyasyam Please reffer below code
Days =
CALCULATE (
[Sum Of Sale],
FILTER (
ALL ( 'Table Y'[Date] ),
DATEDIFF ( 'Table Y'[Date], MAX ( 'Table Y'[Effective Date] ), DAY ) < 31
&& DATEDIFF ( 'Table Y'[Date], MAX ( 'Table Y'[Effective Date] ), DAY ) >= 0
)
)
@dhanyasyam If this post helps you please mark as solutions and give the Thump/kudos.THANK YOU!!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!