Forum Discussion
Reference total in matrix row values
Hi
Im using a matrix table to show some data, but on the row level i want to work out the percentage of a value, but i want to use the top level/total value for part of the caluclation rather than the value at row level. How do i go about doing this?
Dummy Data:
| Sales Team | Sub Rows | Total Sales | Total Sales By Another Team | % Sold by Another Team |
| Main Sales Team | 50 | 30 | 60% | |
| Sales Team 1 | 10 | 20% | ||
| Sales Team 2 | 5 | 10% | ||
| Sales Team 3 | 5 | 10% |
Dax Query need to alter:
Total Sales % Main Teamvs Other Team= DIVIDE([Total Sales in Diff Department],[Total Sales])
Dax Query used for above query:
Total Sales in Diff Department =
CALCULATE(sum('Sales'[Sales Qty]),
FILTER('Sales',[Other Sales dept] <> [Main sales Dept]))
Total Sales =
sum('Sales'[Sales Qty])3 Replies
- v-juanli-msftCommunity Support
Hi elenton
Is the "Dummy Data" your raw data or expected results?
Sales Team Sub Rows Total Sales Total Sales By Another Team % Sold by Another Team Main Sales Team 50 30 60% Sales Team 1 10 20% Sales Team 2 5 10% Sales Team 3 5 10% Best Regards
Maggie- elentonHelper II
v-juanli-msft
The first 4 rows are data i already have wored out using the dax measures i mentioned, what i want to work out is % Sold by Another Team- v-juanli-msftCommunity Support
Hi elenton
Could you share me an example table with columns [Other Sales dept], [Main sales Dept], [Sales Qty]?
In addition, maybe you can try to modify
Total Sales = sum('Sales'[Sales Qty])
to
Total Sales = calculate(sum('Sales'[Sales Qty]),all('Sales'))Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.