Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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])
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
@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
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
Maggie
Community 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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |