Forum Discussion
Measures with Sum in Matrix Rows
- 1 year ago
Hi matt_campbell ,
Please find attached snap and PBIX file.
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 ,
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.
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.
- v-dineshya1 year agoCommunity Support
Hi matt_campbell ,
Please find attached snap and PBIX file.
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.- v-dineshya1 year agoCommunity Support
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.