I am trying to add an additional column to my queried data with a fixed value equal to the maximum value of the column “_value”.
The query so far looks like this (not working):
I messed around with this yesterday but could not get it. I am sure it’s possible (and probably easy once I see how it’s done). Post here if you get a solution and I will do the same.
The trick is to build a new table with only the maximum value (last value of sorted values). Then rename the column and drop the other columns. If you join the tables by using union a new column is created. I didn’t manage to fill the whole column with this one value. Therefore, I have sorted the table in ascending order which puts the row with the value in the separate column (amount) on top. Then you can use the command fill with useprevious. That leads to a column with your maximum value.