Forum Discussion
how to addition 3 rows with in a filter dax
hi Team,
Requesting please check below concern and do the needful.
i have a Event_type fileld in that many classification but i need to add 3 columns to caclualte cont of orders
Order quantity = event_type(OUTWARD_ORDER_CANCEL) + event_type( OUTWARD_ORDER_COMPLETE) + event_type( OUTWARD_ORDER_SHIPMENT_DISPATCH)
Your OP says you need 3 columns..
Instead of Table filter, use column filter and update your Measure to
Order quantity =
CALCULATE(
COUNTROWS(order_items),
outward_orders[event_type] IN {
"OUTWARD_ORDER_CANCEL",
"OUTWARD_ORDER_COMPLETE",
"OUTWARD_ORDER_SHIPMENT_DISPATCH"
}
)
4 Replies
- MasonMA
Super User
So the straight way would be creating 3 separate calculated columns for each event type, for example,
Cancelled Orders =
IF('Table'[Event_type] = "OUTWARD_ORDER_CANCEL", 1, 0)and same logic for your 'Completed Orders' and 'Dispatched Orders'. Then you can sum those columns in visuals.
- krishna_murthy
Helper II
MasonMA is that possible make one dax expression ???? finaly i need all 3 columns should be added and show total orders
Below DAX i have used but getting wrong , pleas fix it is possibleOrder quantity =CALCULATE(COUNTROWS(order_items),FILTER(order_items,RELATED(outward_orders[event_type]) <> "OUTWARD_ORDER_CANCEL" &&RELATED(outward_orders[event_type]) <> "OUTWARD_ORDER_COMPLETE" &&RELATED(outward_orders[event_type]) <> "OUTWARD_ORDER_SHIPMENT_DISPATCH "))- MasonMA
Super User
Your OP says you need 3 columns..
Instead of Table filter, use column filter and update your Measure to
Order quantity =
CALCULATE(
COUNTROWS(order_items),
outward_orders[event_type] IN {
"OUTWARD_ORDER_CANCEL",
"OUTWARD_ORDER_COMPLETE",
"OUTWARD_ORDER_SHIPMENT_DISPATCH"
}
)
- krishna_murthy
Helper II
MasonMA .. Its working now
if any concern will have then will check and revert an update