Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a dataset of all sales order items using the format below. I would like to create a measure that returns the value of all orders that contain C1. It must include the values of all items on the order, not just C1. How would I go about this?
OrderNo | Code | Qty | Subtotal |
Ord1 | C1 | 1 | 10.00 |
Ord1 | C2 | 3 | 15.00 |
Ord2 | C1 | 2 | 20.00 |
Ord2 | C3 | 3 | 9.00 |
Ord 3 | C2 | 4 | 20.00 |
Ord3 | C3 | 1 | 3.00 |
Solved! Go to Solution.
You could use
C1 Sales =
VAR C1Orders =
CALCULATETABLE ( VALUES ( Sales[Order no] ), Sales[Code] = "C1" )
VAR Result =
CALCULATE ( SUM ( Sales[Subtotal] ), C1Orders )
RETURN
Result
You could use
C1 Sales =
VAR C1Orders =
CALCULATETABLE ( VALUES ( Sales[Order no] ), Sales[Code] = "C1" )
VAR Result =
CALCULATE ( SUM ( Sales[Subtotal] ), C1Orders )
RETURN
Result
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
15 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |