Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
22 | |
10 | |
10 | |
9 | |
7 |