Forum Discussion
Date Difference issue
Anonymous I guess you are not using datediffmeasure in R Channel OnTime or Late calculation. try using date diff measure
AR Channel OnTime or Late = if(Date Difference Measure <=3, "On Time","Late")
Or else here is another approach
1. Create a weekday column in date table
Weekday = WEEKDAY('Calendar'[Date],2)
2. Finally create a measure
Measure =
VAR _due = SELECTEDVALUE('Table'[Due Date])
VAR _shipped = SELECTEDVALUE('Table'[Date Shipped])
VAR _datediff = CALCULATE(COUNTROWS('Calendar'),FILTER('Calendar','Calendar'[Date]>=_due&&'Calendar'[Date]<=_shipped&&'Calendar'[Weekday]<6))
RETURN IF(_datediff<=3,"On Time","late")Hi Vimal - Your new options worked well.
The only issue I am seeing is that in a table visual, when I have that measure applied on the table, it seems to ignore any date filter.
For example, I have the Page filtered to only show 2020 orders....but regardless of that the table visual shows me orders from all years. If I remove the measure from the table, I get my filtered results back again to just 2020 orders.
Any idea why this is happening?