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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

truptis

New August Update on ORDERBY function in DAX

Below is the syntax for ORDERBY function:

ORDERBY([<orderby_expression>, <order>[,<orderby_expression>[,<order>]] ...]]

 

Example: 

ORDERBY(SUM(column name), DESC/ASC)

 

But with the new update, now we can handle blank values. We can keep BLANKS in the beginning or at the end irrespective of it's sorting order(Ascending/Descending)

 

Eg: ORDERBY(SUM(TotalSales), ASC BLANKS LAST)

This will return the total sales amount in ascending order and the blank values will be at the end. 


Similarly, if we write ORDERBY(SUM(TotalSales), ASC BLANKS FIRST) then it will return total sales amount in ascending order keeping the blank values at the beginning. 

Comments

I found it beneficial, Thanks for sharing!

Thank you for an Update !!