Calculate total number of orders in different statuses

46 Views Asked by At

I want to create simple dashboard where I want to show the number of orders in different statuses. The statuses can be New/Cancelled/Finished/etc

Where should I implement these criteria? If I add filter in the Cube Browser then it applies for the whole dashboard. Should I do that in KPI? Or should I add calculated column with 1/0 values?

My expected output is something like:

--------------------------------------
| Total | New | Finished | Cancelled |
--------------------------------------
| 1000  | 100 |    800   |   100     | 
--------------------------------------
1

There are 1 best solutions below

0
Gigga On

I'd use measures for that, something like:

CountTotal = COUNT('Orders'[OrderID])
CountNew = CALCULATE(COUNT('Orders'[OrderID]), 'Orders'[Status] = "New")
CountFinished = CALCULATE(COUNT('Orders'[OrderID]), 'Orders'[Status] = "Finished")
CountCancelled = CALCULATE(COUNT('Orders'[OrderID]), 'Orders'[Status] = "Cancelled")