Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi PBI community,
I am having issues with subtotals not adding up to total items in a category in a matrix.
My goal is to get the quantities sold for a Product.
For this I need to multiply:
This is my measure formula:
And this is an example of my two tables above:
Product Table | ||
SKU | Cheese Type | Qty in Carton |
Brie01 | Brie | 10 |
Brie02 | Brie | 10 |
Brie03 | Brie | 10 |
Camembert01 | Camembert | 5 |
Sales Table | |
SKU | Qty Sold |
Brie01 | 1 |
Brie02 | 1 |
Brie03 | 1 |
Camembert01 | 3 |
As evident they are joined by the SKU column which has unique values.
Now, when filtering by "Cheese Type" I am expecting to obtain
Since Camembert is a unique value at both SKU and Cheese Type level - there are no issues returning the correct amount
However for Brie subtotal - instead of 30, I obtain 90 - which I believe happens because the engine is multiplying by 3 when finding 3 types of Brie cheese products.
What's the most effective way to deal with these type of issues
Solved! Go to Solution.
Hi @dino19547 ,
Try using following measure:
Hi Tanushree, may I ask - why does your solution work with Values(Table[SKU] and not with Values(Table[Cheese Type] under this filter context? Sorry this is a burning question I have!
Hi @dino19547 ,
Try using following measure:
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 |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |