Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
i have a calender table and Holiday Table , I do not have a relationship with Calendar Table and Hoiday Table, i need DATEDIFF between two dates, and within the function exclude weekends and holidays between these two dates.
Calendar table code
i have done Weekend but i Don't know how to do Holiday, How can i add holiday list in Calender table
here is the result that i get from the formula,
Solved! Go to Solution.
HI @Anonymous ,
Create 2 calculated column
Hi @Anonymous
This is easier than you think 🙂 Once you have your calendar and holidays, just based on the holidays mark the days in the calendar that are in the holidays table. This will be a calculated column of bool type. TRUE - holiday, FALSE - ordinary day. Once you've got the flag column (hidden), you can now easily author a measure that will use the flag to give you what you want.
Best
D
HI @Anonymous ,
Have you tried this.
https://www.youtube.com/watch?v=v9s0PPLU0n8
https://community.powerbi.com/t5/Desktop/Public-Holiday-Script/td-p/178341
https://community.powerbi.com/t5/Desktop/Matching-dates-to-a-holiday-table/td-p/430803
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
i have created Holiday table and calender table then how can i merge this two table, in query editor calenrder table is not showing
Hi @Anonymous ,
Follow these steps to create a holiday Column.
Post this I guess you will have 2 Column, Weekend and Holidays.
Then Create a Column to merge these
IF( AND( Weekdays = Saturday, Weekday = Sunday, IsHoliday = TRUE ), 0, 1 )
Regards,
Harsh Nathani
Hi @harshnathani Thanks for your reply
I have done WorkingDays , but Holidays calculation not working
I have attached my PBIX file Click here Could you Please check?
Thanks & Regards,
Rajesh
Hi @Anonymous ,
https://drive.google.com/file/d/117v9j_c4WuaeJjCmj9RaSpmBAvkZzO9U/view?usp=sharing
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Thanks for your reply, i'm not able to open that file which you attached
Could you Please share the steps please, sorry for the inconvenience
Thanks
Rajesh
HI @Anonymous ,
Create 2 calculated column
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |