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 am trying to create a measure that calculates the Sum of all spend for “Type” (A) where “Transpo” equals(car, boat, truck , bike) while excluding Accounts 9,10,11. Can anyone help me with this?
Type | Spend | Account | Transpo |
A | 20,000,000 | 1 | car |
A | 20,000,000 | 2 | Boat |
A | 20,000,000 | 3 | Truck |
A | 20,000,000 | 4 | Bike |
A | 20,000,000 | 5 | Plane |
A | 50,000,000 | 6 | Helicopter |
A | 10,000,000 | 7 | Truck |
A | 10,000,000 | 8 | Bike |
A | 50,000,000 | 9 | Plane |
A | 50,000,000 | 10 | Helicopter |
A | 50,000,000 | 11 | Scooter |
B | 10,000,000 | 3 | board |
B | 10,000,000 | 3 | skate |
Solved! Go to Solution.
You can use this measure expression
NewMeasure =
CALCULATE (
SUM ( Table[Spend] ),
Table[Type] = "A",
Table[Transpo]
IN {
"Car",
"Boat",
"Truck",
"Bike"
},
NOT ( Table[Account]
IN {
9,
10,
11
} )
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You can use this measure expression
NewMeasure =
CALCULATE (
SUM ( Table[Spend] ),
Table[Type] = "A",
Table[Transpo]
IN {
"Car",
"Boat",
"Truck",
"Bike"
},
NOT ( Table[Account]
IN {
9,
10,
11
} )
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |