New column in output for each record
Options
Himanshu
Member ✭
I have an Employee table which stores the Name and Salary. I want to run a query to
- Calculate the average salary of the entire table.
- Check each Employee's salary. Label it as High or Low if it is higher/lower than the average.
- Get an output for each Employee's Name, Salary and Status [high or low].
The first step is working, and I can create and use the average salary. I am stuck creating a new column/variable for each Employee to store the Status value.
Comments
-
Hi,
You can either use eval if you have access to data directly from query or update the query variable but instead of existing path you can create new path and assign a value to it.
-
Thanks Pawel. It worked.
I can get a boolean result if the grade is < average.
Any way to get a text field with High and Low as the output?
-
Directly in eval I don't think so, but certainly you can do this in next steps in a couple of different ways, for example by using replace filter or lambda
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback