Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Dear Team,
I need your support to creeate a measure calculating number of working days knowing that Saturday & Friday days are off, i mean to exculude both "Friday & Satureday" from working days calculations.
Notes:
1-Rep name field name is: territory.
2-"Call Time" highlighted field is the right date and time.
File link: https://drive.google.com/file/d/1ATq6hyGl8urx3_wAMjnGesh3677zAidO/view?usp=sharing
Regards,
Mohsen
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi , I need it in a measure so i can put it in a card will display the working days as a number.
@Ashish_Mathur , Please help.
Regards,
Mohsen
Hi @Mohsen_2020 ,
1. There are seven rows without any data in your data table.
2. In Power Query split column Call Time in date part and time part.
3. Now you can calculate your workin days like this:
Sum of weekdays =
CALCULATE (
DISTINCTCOUNT ( report1617266304758[Date] ),
FILTER (
report1617266304758,
WEEKDAY ( report1617266304758[Date] ) IN { 1, 2, 3, 4, 5 }
)
)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hi @Mohsen_2020 ,
open your data in Power Query and add a new column that holds the information 'Is Workingday'. 1 is workingday, 0 isn't workingday. Use the following M-code (4 = Friday, 5 = Saturday):
= Table.AddColumn(#"Changed Type", "Is Workingday", each if Date.DayOfWeek([Call Time]) = 4 or Date.DayOfWeek([Call Time]) = 5 then 0 else 1, Int64.Type)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
88 | |
85 | |
82 | |
65 | |
49 |
User | Count |
---|---|
137 | |
111 | |
101 | |
66 | |
65 |