- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate the difference between two dates and two hours excluding days/WE
Hi Microsoft community,
I am a beginner with Power BI (I usually use Excel only)
I need to calculate 2 things :
- The number of hours between 2 dates and times, excluding WE and holidays.
- The number of days between 2 dates, excluding WE and holidays
The format of the two dates are like this :
Date d'envoi | Date approbation |
28/02/2020 15:36:38 | 02/03/2020 10:56:55 |
02/03/2020 11:12:45 | 02/03/2020 11:18:32 |
I need to do [Date approbation]-[Date d'envoi] excluding WE/holidays
I already have a table with the list of all the WE and holidays .
Keep in mind that I am a beginner so if you have a simple solution, it will be great. I like to understand the solution and not only copy it.
Thank you very much !
Best regards,
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous , You can find out work days like this
a new column
Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Date denvoi],Table[Date approbation),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))
You can also refer this for business refer
https://exceleratorbi.com.au/calculating-business-hours-using-dax/
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview. ✨
️ November 12th-14th, 2024
Online Event
Register Here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous
You can first refer to below blogs about how to count working days and working hours. You may need some time to learn the functions and concepts involved.
Counting working days in DAX - SQLBI
Power BI DATEDIFF only working days, hours and so on... • Tomasz Poszytek, Business Applications MVP
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous , You can find out work days like this
a new column
Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Date denvoi],Table[Date approbation),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))
You can also refer this for business refer
https://exceleratorbi.com.au/calculating-business-hours-using-dax/
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview. ✨
️ November 12th-14th, 2024
Online Event
Register Here
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
05-01-2024 02:29 PM | |||
Anonymous
| 10-27-2023 01:00 AM | ||
Anonymous
| 11-08-2023 03:28 AM | ||
03-27-2024 04:17 AM | |||
04-08-2024 10:45 AM |
User | Count |
---|---|
115 | |
76 | |
45 | |
43 | |
32 |
User | Count |
---|---|
172 | |
90 | |
66 | |
46 | |
45 |