The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Is there a way to Count Distinct Order with Sales above 300.
I tried this expression but getting wrong result.
OrderID | OrderDate | ShippedDate | Delivery Date | Sales |
1 | 13/1/2020 | 15/02/2020 | 13/03/2020 | 100 |
2 | 15/02/2020 | 13/03/2020 | 15/04/2020 | 50 |
2 | 15/02/2020 | 13/04/2020 | 15/05/2020 | 300 |
3 | 15/02/2020 | 13/03/2020 | 15/04/2020 | 250 |
3 | 15/02/2020 | 13/04/2020 | 15/05/2020 | 60 |
4 | 15/02/2020 | 13/03/2020 | 15/04/2020 | 30 |
4 | 15/02/2020 | 13/04/2020 | 15/05/2020 | 80 |
Solved! Go to Solution.
It's all about context. Give this a try:
Order Count =
CALCULATE(
DISTINCTCOUNT( Sheet1[OrderID] ),
FILTER (
VALUES(Sheet1[OrderID]),
CALCULATE( SUM ( Sheet1[Sales] ) > 300 )
)
)
It's all about context. Give this a try:
Order Count =
CALCULATE(
DISTINCTCOUNT( Sheet1[OrderID] ),
FILTER (
VALUES(Sheet1[OrderID]),
CALCULATE( SUM ( Sheet1[Sales] ) > 300 )
)
)