Forum Discussion
Matrix Row Wise sum
Hi Team,
I need an urgent support in a dax query for the matrix in bi. I have one requirement where i need to show the availability of the resources. Suppose there are 10 Ops manager and 50 Reporting manager in an organization and under those 50 reporting managers 200 people are there distributed accordingly. So i am creating a matrix in which i want to show the avaiable resource under ops and reporting manager. For example John as a reporting manager has 4 employees so i want to show there availability in a matrix, for example-
| Occupancy | |||
| Jan-24 | Feb-24 | Mar-24 | |
| John | 2 | 3.1 | 3 |
| 1- Paul | 1 | 0.8 | 0.2 |
| 2-Sophie | 0.8 | 1 | 1 |
| 3-Jack | 0.2 | 0.5 | 0.8 |
| 4-Smith | 0.8 | 1 |
| Availability | |||
| Jan-24 | Feb-24 | Mar-24 | |
| John | -1 | -2.1 | -2 |
| 1- Paul | 0 | 0.2 | 0.8 |
| 2-Sophie | 0.2 | 0 | 0 |
| 3-Jack | 0.8 | 0.5 | 0.2 |
| 4-Smith | 1 | 0.2 | 0 |
I have one query (Total Demand) which is calculating the demand/occupancy and for calculating the capacity i am doing 1-[Total Demand] so i am getting capacity but the probelm is when it comes to individual availability it's showing the proper number as the above table is showing only problem is when you will see for John for the month of Jan-24 it's showing -1, and total Demand for Jan-24 is 2 and as per query it's giving me -1 but i need the sum of 0+0.2+0.8+1 = 2. Please suggest some query which can give me the desired output. Please team sorry for long description, it's urgent please help me out.
Anonymous First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
2 Replies
- AnonymousNot applicable
Hello Greg_Deckler ,
Hope you're doing great.
You're approach using OneHasFilter worked for me. Thanks for your support. It really helped me a lot. Wishing you very good health and luck.Thanks once again 🙂
- Greg_Deckler
Community Champion
Anonymous First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8