<div dir="ltr">Bia;<div>In 2.16.2 you can right click the column header and choose sort, this will bring up an expression builder. In there just add the field you want to sort by "Field_Name" or you can get fancy and say you want to sort by a number and a string field. Then you would do something like this "String_Field"||right(  ('00000000' || "Numeric_Field"), 8) Notice the "00000000" being added, that is because the expression treats the number like a string. Padding it with zeros sorts allows it to sort in order 1,2,3,4 if you do not pad you will end up with. 1,10,11,12,etc...<br>Dual sorting with date is a bit tricky but you can store the data as a YYYY,MM,DD type and it should sort for you. If your date is stored in another way, i.e. DD/MM/YYYY then you will have to format it to YYYY,MM,DD for proper sorting, i.e. Year("Date")||Month("Date")||Day("Date") should work to that effect. </div><div>As for sorting one column Ascending and another Descending I am at a loss, have not been able to figure that one out but someone here might add to my answer if you need to do that.</div><div>Additionally if your using an older version of QGIS that does not have the "sort" function you could write the expression to a virtual field and then sort it by clicking the column header of the new virtual field.</div><div>Hope that helps.</div><div>Tyler</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 14, 2016 at 7:38 AM, Bia <span dir="ltr"><<a href="mailto:bia.fs2000@gmail.com" target="_blank">bia.fs2000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi, how can I to organize my table considering the date? I tried a expression but did not work. <br>
And after I wanna compare other columns to have a precision table. </p>
<p dir="ltr">Thank you! </p>
<br>______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>