Rank summarised results...

Matty

Well-known Member
Joined
Feb 17, 2007
Messages
3,717
Hi,

I know I can use SUMMARIZE to create a grouped and summed table using DAX, but how do I then sort/rank the resulting table?

Here's my DAX formula as it stands

Code:
Aggregated Table =
SUMMARIZE(
   'Table1,Table1[Column1],
    "Total",
    SUM(Table1[Column2])
)

I was hoping to add a function similar to ORDER BY in SQL to the above, but I can't get anything to work.

Hope someone can help.

Cheers,

Matty
 
Code:
Aggregated Table =
CALCULATETABLE (    
    SUMMARIZE(
        'Table1,Table1[Column1],
        "Total",
        SUM(Table1[Column2])
    ),
    Table1[Shop] = "Shop A"
)

Hi Gaz,

Thanks for this, but I need all of the functionality of the first formula (i.e. including the rank).

Can this be done?

Cheers,

Matty
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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