Forum Discussion
Anonymous
7 years agoNot applicable
Use Measure with previous workday
I have a simple measure: Orders released not shipped =
CALCULATE(
COUNT(CD_OTTC_SHIPPING_LINE[KeyID]); CD_OTTC_SHIPPING[ISBLANK_DISPATCH_DATE] = TRUE
) I need this KPI for each day and the p...
- Anonymous7 years ago
I played around a little bit with your code and came up with this solution. Seems to work now.
Test previous wd = VAR currDate = MAX (DimDate[Date]) VAR prev = MAX(Workdays[previous workday]) RETURN CALCULATE ( [Orders released not shipped]; FILTER(ALLSELECTED(CD_OTTC_SHIPPING_LINE); CD_OTTC_SHIPPING_LINE[date.OLLASTUPDDTE] = prev ) )
Anonymous
7 years agoNot applicable
Basicly i have to FILTER my table so that i get each row where
[OLLASTUPDDTE].[Date]
is equal to my "previous workday". My report table would contain a current date 2019-04-23 whre my "previous workday" is the 2019-04-18 because in Germany 19-22 is a holiday. So i need all entries from my table where [OLLASTUPDDTE].[Date] = 2019-04-18. There will be several entries for this date. I could then use my Measure:
[Orders released not shipped]
Result should be my current 2019-04-23 date with my Counted rows from 2019-04-18.
Anonymous
7 years agoNot applicable
I played around a little bit with your code and came up with this solution. Seems to work now.
Test previous wd =
VAR currDate =
MAX (DimDate[Date])
VAR prev =
MAX(Workdays[previous workday])
RETURN
CALCULATE (
[Orders released not shipped];
FILTER(ALLSELECTED(CD_OTTC_SHIPPING_LINE); CD_OTTC_SHIPPING_LINE[date.OLLASTUPDDTE] = prev )
)