-1

I've been trying to do a report about the quantity of breakdonws of products in our company. The problem is that the QUERY function is operating as normal, but the sorting order is well - a bit strange. The data I'm trying to sort are as follows (quantities are blacked out since I cannot share those informations): Raw data1 First column - name of the product, second, it's EAN code, third, breakdown rate for last year, last column - average breakdown rate. "b/d" means "brak danych" or no data. What I want to achieve is to get the end table with values sorted by average breakdown rate. My query is as follows:

=query(Robocze!A2:D;"select A where A is not null and NOT D contains 'b/d' order by D desc")

Final result2

As You can see, we have descending order, but there are strange artifacts - like the 33.33% after 4,00% and before 3,92%. Why is that!?

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • share a copy / sample of your sheet with an example of the desired output – player0 Oct 10 '22 at 12:57
  • Kindly add input table and expected output table as **text table** (NOT as IMAGE) to the question. [Click here](https://webapps.stackexchange.com/a/161855/) to create a table easily. Adding such tables greatly increases your chances of getting a elegant answer, as **it is easier to copy/paste**. If you share spreadsheets, your question maybe closed, as questions here must be [self contained](https://meta.stackoverflow.com/a/260455). [Your email address can also be accessed by the public](https://meta.stackoverflow.com/questions/394304/), if you share Google files. – TheMaster Oct 10 '22 at 13:36

1 Answers1

-1

try:

=INDEX(LAMBDA(x; SORT(x; INDEX(x;; 4)*1; 0))
 (QUERY(Robocze!A2:D; "where A is not null and NOT D contains 'b/d'"; 0));; 4)
player0
  • 124,011
  • 12
  • 67
  • 124