Forum Discussion
Count Of Orders
order id amount payment method
1 4 4
1 3 3
1 2 2
2 1 2
2 2 4
3 2 3
3 3 1
4 4 2
4 7 1
5 1 1
i need to find count of order for paticular payment method in a way that
1=1>3,1>4 amount in payment method should be greater than all payment method in that particular order
2=2>3,2>4
3=3>1,3>2,3>3
4=4>1,4>2,4>3
9 Replies
- AnonymousNot applicable
What is the expected output for the above sample?
- qwaiti27231Helper III
4 -2 orders
3- 1 orders
2-0 orders
1-3 orders
- AnonymousNot applicable
qwaiti27231,
Please create the following measure in your table. If the DAX doesn't return your expected result, please describe more details about your logic.count of orders = CALCULATE(COUNT(Table[order id]),FILTER(Table,Table[amount]>=Table[payment method]))+0
Regards,
Lydia- qwaiti27231Helper III
payment Method Orders(count of order id)
4 -2 orders
3 - 1 orders
2 -0 orders
1 -3 orders
- qwaiti27231Helper III
i need to find count of order for paticular payment method in a way that
1=1(amount in payment method)>3(amount in payment method),1>4(amount in payment method) amount in payment method should be greater than all payment method in that particular order id
2=2(amount in payment method)>3(amount in payment method),2(amount in payment method)>4(amount in payment method)
3=3(amount in payment method)>1(amount in payment method),3(amount in payment method)>2(amount in payment method),3>4
4=4(amount in payment method)>1(amount in payment method),4(amount in payment method)>2(amount in payment method),4(amount in payment method)>3(amount in payment method)