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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply

evaluate ... order by in Power BI DAX Table.

How can i use this command in Power BI Dax tables;

actually i want to order by dax table on monthseq, but unable to do, i have tried topn and sample. both are giving wrong result.

 

EVALUATE SUMMARIZE(FILTER(DateDimension,DateDimension[Day]<>"Sun"), DateDimension[MonthYY]
DateDimension[MonthSeq], "Days",DISTINCTCOUNT(DateDimension[DateKey]) ) ORDER BY DateDimension[MonthSeq] DESC

2 REPLIES 2

Thanks     @v-qiuyu-msft for reply.

 

this sort command works for visual, not work in data view. I need to see data sorted in data view.

 

 

v-qiuyu-msft
Community Support
Community Support

Hi @sajidmansoorali,

 

The Evaluate doesn't support in Power BI desktop. You can create a calculate table below: 

 

Table= SUMMARIZE(FILTER(DateDimension,DateDimension[Day]<>"Sun"), DateDimension[MonthYY]
DateDimension[MonthSeq]"Days",DISTINCTCOUNT(DateDimension[DateKey]))

 

Then go to Data tab, right click on the DateDimension[MonthSeq] column, and click Sort Descending. 

 

q2.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!