Forum Discussion
Baarathi88
6 years agoHelper III
Restrict based on summation
Is there a way to Count Distinct Order with Sales above 300. I tried this expression but getting wrong result. Order Count = CALCULATE(DISTINCTCOUNT(Sheet1[OrderID]),FILTER(Sheet1,Sum(Sheet1[S...
- 6 years ago
It's all about context. Give this a try:
Order Count = CALCULATE( DISTINCTCOUNT( Sheet1[OrderID] ), FILTER ( VALUES(Sheet1[OrderID]), CALCULATE( SUM ( Sheet1[Sales] ) > 300 ) ) )
jdbuchanan71
6 years agoSuper User
It's all about context. Give this a try:
Order Count =
CALCULATE(
DISTINCTCOUNT( Sheet1[OrderID] ),
FILTER (
VALUES(Sheet1[OrderID]),
CALCULATE( SUM ( Sheet1[Sales] ) > 300 )
)
)Baarathi88
6 years agoHelper III
jdbuchanan71 Thank you, that works