2

With the following Query: =QUERY(Transactions!$A$2:$N$300;"SELECT A, B, C, D, E, F, K, L, M, N")

I am trying to get the results from F and N to be absolute values while leaving the rest as is and I am having issues with the syntax of this line.

I tried a few options by adding {} and \ in the formula but I still keep getting a parsing error. It is probably an easy fix but I just do not know how to go about it.

Thanks!

1 Answers1

1

Try ABS() is not recognized as QUERY() aggregation function. So, use ABS() for those columns (you want absolute value) then merge using either array notation {...} or using HSTACK() function. Try-

=QUERY({A:C,INDEX(ABS(D:E))},"select *")

Using HSTACK() function.

=QUERY(HSTACK(A:C,INDEX(ABS(D:E))),"select *")

enter image description here

Harun24hr
  • 30,391
  • 4
  • 21
  • 36
  • Perfect! Thank you so much! The normal query syntax with the {...} was returning a #VALUE error but the HSTACK formula is working perfectly! – Fran Salinger Mar 22 '23 at 14:15
  • Glad to know! If it works then please consider accepting the answer (tick mark it) to treat the thread as solved. – Harun24hr Mar 22 '23 at 14:26