Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
matt_campbell
Regular Visitor

Measures with Sum in Matrix Rows

Hi all -

I have a Matrix visual showing inventory liquidation data. The rows come from a pre-aggregated fact table. Filtering works fine for 1:1 relationships (stocked month to inventory), but breaks when I add dimensions like Inventory Types or Departments to the row-level fact table. How can I properly filter on these dimensions without breaking the matrix relationships? Here is a sample of the Row fact table:

 

Stocked MonthInventory StockedRemaining Inventory
1/31/2021631752663
2/28/2021567272306
3/31/2021777923234


Here is a sample of the Columns and Values table:

 

IDSold DateSold Date FormattedLast_Date_Of_Month
11/21/20212021-11/31/2021
22/5/20212021-21/31/2021
371/14/20212021-11/31/2021
1031/15/20212021-11/31/2021
1321/15/20212021-11/31/2021
1661/15/20212021-11/31/2021
891/19/20212021-11/31/2021
1231/19/20212021-11/31/2021
1631/19/20212021-11/31/2021
1751/19/20212021-11/31/2021
1841/19/20212021-11/31/2021
121/20/20212021-11/31/2021
1181/20/20212021-11/31/2021
1701/20/20212021-11/31/2021
71/21/20212021-11/31/2021
182/9/20212021-22/28/2021
302/9/20212021-22/28/2021
1472/9/20212021-22/28/2021
863/16/20212021-33/31/2021

 

Here is a sample of the current output. I only want to filter on dimensions. I do not need to display them.

 

Inventory Liquidation.png

1 ACCEPTED SOLUTION

Hi @matt_campbell ,

Please find attached snap and PBIX file.

vdineshya_0-1749877566004.png

vdineshya_1-1749877602391.png

If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

 

View solution in original post

6 REPLIES 6
v-dineshya
Community Support
Community Support

Hi @matt_campbell ,

Thank you for reaching out to the Microsoft Community Forum.

 

You are expecting to filter properly without displaying those dimensions in the visual.

Please follow below steps.

1. Created 3 tables, InventoryType, InventoryFact and Department with sample data.

2. Created Measure "Inventory Stocked Filtered" with below DAX.

Inventory Stocked Filtered =
CALCULATE(
SUM('InventoryFact'[Inventory Stocked]),
TREATAS(VALUES(InventoryType[Inventory Type]),InventoryFact[Inventory Type]),
TREATAS(VALUES('Department'[Department]), 'InventoryFact'[Department])
)

3. Created Measure "Remaining Inventory Filtered" with below DAX.

Remaining Inventory Filtered =
CALCULATE(
SUM('InventoryFact'[Remaining Inventory]),
TREATAS(VALUES('InventoryType'[Inventory Type]), InventoryFact[Inventory Type]),
TREATAS(VALUES(Department[Department]),InventoryFact[Department])
)

4. In Matrix visual, Drag 'InventoryFact'[Stocked Month] in Rows, Inventory Stocked Filtered and Remaining Inventory Filtered measures in Values and
InventoryType[Inventory Type] and 'Department'[Department] in slicers.

5. Please refer output snap and attached PBIX file for your reference.

vdineshya_0-1749653677957.pngvdineshya_1-1749653735987.png

 

If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

This does not accomplish setting multiple rows. I need each row to be Stocked Month, Stocked Inventory, Inventory Remaining. The columns should be Sold Month. Values are Count of Sold. I've attached an updated example. 

matt_campbell_0-1749656912895.png

 

Hi @matt_campbell ,

Please find attached snap and PBIX file.

vdineshya_0-1749877566004.png

vdineshya_1-1749877602391.png

If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

 

Hi @matt_campbell ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

 

Thank you.

TzuChiao26
Frequent Visitor

How is your pre-aggregated fact table linked to row-level fact table?
Also, could you explain how the matrix visual works (how each cell is calculated)? That might help others figure out how to build the solution.

Thank you for the reply. The tables are linked by Last_Date_Of_Month. I have updated the original post which I left out that column. The matrix cells are the Count Sold divided by Inventory Stocked for the row. The cells can also show Count. Here is a view of count. 

 

matt_campbell_0-1749654312233.png

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors