Forum Discussion
Find overdue dates this month
- 1 year ago
Overdue_Flag = IF( AND( YourTable[Complete By] <= EOMONTH(TODAY(), 0), YourTable[Complete By] >= DATE(YEAR(TODAY()), MONTH(TODAY()), 1) ), 1, 0 )Can you please try this as calculated column?
- 1 year ago
This measure is currently counting all records, not just those where DaysOverdueFlag equals 1.
This behavior occurs because the expression myTable[DaysOverdueFlag] = 1 evaluates to a boolean TRUE or FALSE for each row, and COUNTAX counts all non-blank results, including FALSE values.
To count only the rows where DaysOverdueFlag equals 1, you can use the CALCULATE function in combination with the COUNTROWS function and a filter condition:
Overdue Flag = CALCULATE(
COUNTROWS(myTable),
myTable[DaysOverdueFlag] = 1
)
This measure is currently counting all records, not just those where DaysOverdueFlag equals 1.
This behavior occurs because the expression myTable[DaysOverdueFlag] = 1 evaluates to a boolean TRUE or FALSE for each row, and COUNTAX counts all non-blank results, including FALSE values.
To count only the rows where DaysOverdueFlag equals 1, you can use the CALCULATE function in combination with the COUNTROWS function and a filter condition:
Overdue Flag = CALCULATE(
COUNTROWS(myTable),
myTable[DaysOverdueFlag] = 1
)
yes that also works
Thanks for all your help much appreciated
- anilelmastasi1 year agoSuper User
You are welcome Elisa112, anytime 🙂