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

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.

Reply
elenton
Helper II
Helper II

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 TeamSub RowsTotal SalesTotal Sales By Another Team% Sold by Another Team
Main Sales Team 503060%
 Sales Team 1 1020%
 Sales Team 2 510%
 Sales Team 3 510%


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 3
v-juanli-msft
Community Support
Community 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

 

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.