# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  Sort filtered and summarized table in Measure (Datamodel)

## hansolu

Hi

I am still trying to understand DAX and measures and Datamodel as well as PQ.
In a previous post I was able to perform a task in PQ, then same task by using Filter array formulas. Now I want to achive the same functionality by a measure in my datamodel.

I have a table with scrap per day, reason and machine. The measure should sum the reasons by day and machine and then concatenate the reason and the value and sort them by highest to lowest value

E.g. for 8/22 Machine A the result is 


```

```


In PQ its working (=Option1), with the formula (=Option2) its working.  Now my test with the Datamodel (=Option3) is also working, except I can not achive the sorting before the concatenate.

The measure is:



```
Please Login or Register  to view this content.
```


The result is 


```

```


 So basically the numbers are correct, just the order is an issue.

I was doing some research and did not find any options to sort a summarize table which is filter by DAX. 

Do you have any ideas?


General, is the calculated column or the measure the better option if my table has 20k rows?

thanks

----------


## Bo_Ry

Please try

Filter each Scrap > 1



```
Please Login or Register  to view this content.
```


Filter SUM Scrap > 1



```
Please Login or Register  to view this content.
```

----------


## hansolu

Hi

thanks, I am sometimes a bit stupid. I was looking for sorting in Filter and summarize but did not come to the conclusion you can sort in the concatenatex :-)

Performance question:
Which version is the fastest in your opinion? THe measure or the calculated column? 
Thanks a lot

----------

