The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
HI Team
i am wondering if anyone can help me . I am trying to caclulate number of days beweet two days
date A relates to creation of a ticket and Date B relates to reolution of ticket . what i also need to exclude is the Public holiday between these two days .
'Australian Public Holiday' is another table which has list of All the public holidays and has column which is Holiday count as 1
what i have done is use calender function
below creation of columns function
Column_ = // calc column
var __startDate = Fault_Data[Created Date Only]
var __endDate =
coalesce(
Fault_Data[Resolved Date Only],
today()
)
var __result =
if( __startDate <= __endDate,
var __totalDaysWithHols =
DATEDIFF(__startDate, __endDate, DAY) + 1
var __holsCount =
COUNTROWS(
FILTER(
'Australian Public Holiday',
__startDate <= 'Australian Public Holiday'[Date]
&&
'Australian Public Holiday'[Date] <= __endDate
)
)
return
__totalDaysWithHols - __holsCount + 0
)
RETURN
__result
HI ,
Thanks for solution , still cant get through result . ie see below there is public holiday on 12 and 13th april
i am getting result in minus if you see in screen shot ticket created on friday 10th April and resolved in 27th April
please let me know if you have any further questions
Thanks and Regards
tauseef
@tauseefau , See if this file can help. Check 2nd page
https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
11 | |
9 | |
8 |