Forum Discussion
Anonymous
6 years agoNot applicable
All() not filtering my data
I have created a dax table and wish to compare a mtd goal to actuals based on the number of working days in the month. Once in the table, the value for number of working days MTD changes based on the...
- Anonymous6 years ago
I solved the problem by creating a beginning of month and end of month variable and applying days between in the filter for the main variable. Here are the three variables:
var eom=if(month( (SELECTEDVALUE('Order Created Date'[End of Month])))=month(TODAY()) && year((SELECTEDVALUE('Order Created Date'[End of Month])))=year(TODAY()),TODAY(),SELECTEDVALUE('Order Created Date'[End of Month]))var bom=SELECTEDVALUE('Order Created Date'[Start of Month])var workdaysmtd = calculate(count('Order Created Date'[Date]),DATESBETWEEN('Order Created Date'[Date],bom,eom),'Order Created Date'[IsWorkday]=TRUE(),'Order Created Date'[Is Before Today]=true)
Anonymous
6 years agoNot applicable
I solved the problem by creating a beginning of month and end of month variable and applying days between in the filter for the main variable. Here are the three variables:
var eom=if(month( (SELECTEDVALUE('Order Created Date'[End of Month])))=month(TODAY()) && year((SELECTEDVALUE('Order Created Date'[End of Month])))=year(TODAY()),TODAY(),SELECTEDVALUE('Order Created Date'[End of Month]))
var bom=SELECTEDVALUE('Order Created Date'[Start of Month])
var workdaysmtd = calculate(count('Order Created Date'[Date]),DATESBETWEEN('Order Created Date'[Date],bom,eom),'Order Created Date'[IsWorkday]=TRUE(),'Order Created Date'[Is Before Today]=true)
- dax6 years agoCommunity Support
Hi stephembree,
It seems that you sloved this problem, right? If so and if you'd like to, you could mark corresponding post as answer or share your solutions. That way, people who in this forum and have similar issue will benefit from it.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.