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 ) )
Greg_Deckler
7 years agoCommunity Champion
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
Also, I have another Quick Measure in there called Net Work Days that shows how to handle holidays and weekends.