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 There,
I am trying to find the number of days between a same product being applied on a same field on the basis of application dates. Whenever a product is applied on the field, the date is recorded as Application Date.
The report looks like:

and the measure I am using to calculate is:
But this gives me the no. of days between the first and last application dates. What I am looking for is to caclculate no. of days between previous and next application dates.
As per the 1st and 2nd record in the report, No. of days should be 7 days (Previous date :17th June 2021 and Next date: 24 June 2021.
How to achieve this?
Appreciate your help.
Solved! Go to Solution.
Hi @Anonymous ,
Not sure is this is what you need but you can try creating this measure :
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
Hi @Anonymous ,
Not sure is this is what you need but you can try creating this measure :
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
It works as expected. Thank you so much for the quick solution.
You can try
No of days =
VAR currentDate =
SELECTEDVALUE ( 'Table'[Application date] )
VAR nextDate =
SELECTCOLUMNS (
CALCULATETABLE (
TOPN ( 1, 'Table', 'Table'[Application date], ASC ),
ALLEXCEPT ( 'Table', 'Table'[Field], 'Table'[Product], 'Table'[Type] ),
'Table'[Application date] > currentDate
),
"@val", 'Table'[Application date]
)
RETURN
DATEDIFF ( currentDate, nextDate, DAY )
I tried but it was giving me insufficient memory error.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |