Forum Discussion
Overtime Report Help
- 2 years ago
AppleMan ,
Various ways this can be done. I have attached an updated pbix that shows one of these ways.
Import your Holiday Table. Connect it to your Date Table. It should be 1-1 relationship.
Then I created a Calculated Column in your Date Table using SWITCH and LOOKUPVALUE.
I structured it to give you 0's and 1's, but you can replace these with other values if you so choose ("Holiday" or "Work Day").
Let me know if you run into any issues....
Regards and Good Luck
AppleMan ,
Change "COUNT" to "COUNTA". This is how DAX counts text values.
I suggest to change your Condition from "=1" to ">=1" to take into account weeks having more than 1 holiday unless you are absolutely sure there is no week having more than 1 holiday
Hope this works!
You can ignore my last response, I realized the fault in my logic is it is counting the text field and since the "0"'s are considered text it was always above 0. I added a clause in the calculate function to exclude any lines that have a holiday of "0".