Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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)
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 count values , please fix it is possible
Solved! Go to Solution.
HI @krishna_murthy ,
Try the following code:
Order quantity =
CALCULATE(
COUNTROWS(order_items),
FILTER(
order_items,
NOT( outward_orders[event_type] in {"OUTWARD_ORDER_CANCEL", "OUTWARD_ORDER_COMPLETE" , "OUTWARD_ORDER_SHIPMENT_DISPATCH " })
)
)
Since you are using the && (and) syntax the values need to be the same I assume that each of your values have only one value so if you add them in a list you can get those rows, since you want to have the different values you need to use the NOT syntax. Since there is a relationship between both tables theres is no need to do the RELATED option
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português
HI @krishna_murthy ,
Try the following code:
Order quantity =
CALCULATE(
COUNTROWS(order_items),
FILTER(
order_items,
NOT( outward_orders[event_type] in {"OUTWARD_ORDER_CANCEL", "OUTWARD_ORDER_COMPLETE" , "OUTWARD_ORDER_SHIPMENT_DISPATCH " })
)
)
Since you are using the && (and) syntax the values need to be the same I assume that each of your values have only one value so if you add them in a list you can get those rows, since you want to have the different values you need to use the NOT syntax. Since there is a relationship between both tables theres is no need to do the RELATED option
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |