Forum Discussion
USABB_Data
Helper II
7 years agoCalculate Order Value Total ($) When Containing Item used in Filter - Duplicate Order #'s in system
I see the other thread posted here: https://community.powerbi.com/t5/Desktop/Measure-Total-order-value-for-orders-with-item/m-p/322848#M143881 However, we have duplicate order #'s in our system.....
USABB_Data
Helper II
7 years agoThanks that does work but I want to avoid hardcoding dates because I want the measure to be reausable. I have the date filter already on my report as well.
Cmcmahan
Resident Rockstar
7 years agoSo then replace the hardcoded value with a measure or expression that returns the date from your date filter.
Measure = VAR _orders=VALUES(Orders[OrderId]) VAR _curDate = SELECTEDVALUE(Orders[Date]) RETURN CALCULATE(SUM(Orders[Sales]),FILTER(ALL(Orders),Orders[OrderId] in _orders && Orders[Date]>=_curDate))