Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
User | Count |
---|---|
119 | |
78 | |
59 | |
52 | |
48 |
User | Count |
---|---|
171 | |
117 | |
61 | |
59 | |
53 |