DAX formula to display biggest sum value by category

btreg

New Member
Joined
Feb 29, 2016
Messages
30
I have a table of data, an extract of which looks like this:

Country
ProductOfficeSales
UKShoesLeeds100
UKShoesLeeds100
UKShoesLeeds150
UKShoesLondon200
UKShoesLondon
340
UKShoesLondon560
UKShoesBirmingham800
UKShoesBirmingham900
UKShoesBirmingham2000

<colgroup><col span="2"><col><col></colgroup><tbody>
</tbody>

I want to produce a Pivot Table that looks like this:

Product
Biggest Sales
Shoes3700

<colgroup><col><col></colgroup><tbody>
</tbody>

(i.e. I want the DAX formula 'Biggest Sales' to return the sum of Birmingham's sales, as Birmingham has the highest value of sales. I do not want to display the Office names in the Pivot Table).

Any help much appreciated.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi there,

If you're looking for a formula to return the maximum value of sales by Office, this will do the trick (assuming your table is called Sales):
Code:
=
MAXX ( VALUES ( Sales[Office] ), [COLOR=#ff0000][B]CALCULATE ( SUM ( Sales[Sales] ) )[/B][/COLOR] )
If you already have a measure summing sales, you can put it in place of the red portion.
 
Upvote 0

Forum statistics

Threads
1,215,422
Messages
6,124,808
Members
449,191
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top