Forum Discussion
Current Month Working days calculation
My objective is to calculate the number of working days up until yesterday for the current month.
The below measure is working in the Desktop version. However, once it is published not calculating in the Web version.
dimCalendar is a table in PowerBI. IsCurrentMonth and IsWeekDay are columns in the dimCalendar table.
CurrentMonthworkingDays =
CALCULATE (
COUNTROWS (dimCalendar),
FILTER (
dimCalendar,
dimCalendar[Day] <= DAY ( TODAY ()-1 )
&& dimCalendar[IsCurrentMonth]=1
&& dimCalendar[IsWeekDay]="True"))
6 Replies
- Greg_Deckler
Community Champion
ThusiHettigama Maybe try UTCTODAY instead of TODAY?
- ThusiHettigamaRegular Visitor
Greg, Thanks for suggesting a solution for my issue. However after using UTCTODAY function, the issue is still occuring
- Greg_Deckler
Community Champion
ThusiHettigama Hmm, try placing a simple measure like Measure = TODAY() into a Card visualization and see if you get a different value based upon the Desktop or the Service. Wondering if you need to do some kind of TZ conversion.