Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
Iam trying to find a help in a simple count function, Iam sure its very easy, but cannot figure it out...
My example looks like this: I need to have an expression, that will count how many unique orders have the status = exact value.
in this example, should be 1 for status=17, 2 for status=12 and 4 for status=4.
| order_num | status |
| 12000137 | 17 |
| 12000135 | 4 |
| 12000134 | 4 |
| 12000134 | 4 |
| 12000133 | 4 |
| 12000133 | 4 |
| 12000133 | 4 |
| 12000132 | 4 |
| 12000132 | 4 |
| 12000132 | 4 |
| 12000131 | 12 |
| 12000130 | 12 |
| 12000130 | 12 |
Many thx for Your help 🙂
I have make a lot of attempts to finaly got what I needed:
count ({<status={'17'}>} distinct order_num)
Hi,
You can create a table chart with dimension = status
and expression:
Count(DISTINCT order_num)
I hope that helps!
hi,
table chart is not really what I need. the expresion I need for further use in another calculations 😉
For example, if one of the status is canceled order, I need the count only of theese to deduct them from total of my orders.
Thx for help
I have make a lot of attempts to finaly got what I needed:
count ({<status={'17'}>} distinct order_num)