This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello Community -
I have what I think is a simple question. Using the calculated column formula below, my goal is to assign categories to Orders based on the total value of the order. However, what is happening is that the formula is looking at the individual line of the order, rather than order value in total.
For example, it is assigining (incorrectly), the category of "Quick Ship" to these lines below....because they are indeed below 40,000 dollars. But actually the correct categorization of this should be "10 Day" because the value of the Order is above 40,000 and below 100,000.
How can modify my formula to ensure it is taking the total sum of the Order (based on Order ID)?
Solved! Go to Solution.
@Anonymous , You need to have order-level sum, inside this formula or as a new column.
example, both as new columns
order sum = sumx(filter('Shipped', [order no] = earlier([order no] )),[Shipped Price] )
Shipment Category =
switch( true(),
'Shipped'[order sum ] <= 40000,"Quick Ship",
'Shipped'[order sum ] < 100000,"10 Day",
"30 Day"
)
@Anonymous , You need to have order-level sum, inside this formula or as a new column.
example, both as new columns
order sum = sumx(filter('Shipped', [order no] = earlier([order no] )),[Shipped Price] )
Shipment Category =
switch( true(),
'Shipped'[order sum ] <= 40000,"Quick Ship",
'Shipped'[order sum ] < 100000,"10 Day",
"30 Day"
)
Hi @Anonymous ,
Yes, the calculated column is by individual line, but not order.
If you want to sum it based on order id, you may try to use the below calculated measure:
Measure = calculate(sum(your_value),allexcept(your_table,order_id)).
Please try.
Aiolos Zhao
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 25 | |
| 23 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 30 | |
| 23 | |
| 23 |