Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |