Welcome to Excel Jet Consult blog post. In this tutorial, we want to learn how to use Sum with Order By Clause on multiple columns in ascending and descending order. Let’s get started
In the caption below, we want to retrieve Region, Country and Item Type. Furthermore, we want to apply $ currency formatting to the expected Total Revenue and Group By Region, Country and Item Type in Descending, Ascending and Descending Order respectively
Execute the query:
select Region, Country, [Item Type],format([Unit Price] * [Units Sold], ‘c’) as
[Total Revenue] from [Unique 1M Data] order by Region desc, Country asc,[Item Type] desc
From the caption below, we can see Region, Country, Item Type and the calculated value for Total Revenue formatted in $ grouped by Region, Country and Item Type in Descending, Ascending and Descending Order respectively