Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table like this one:
DATE | GROUP | PRICE |
25/10/2012 | A | 14 |
28/10/2012 | A | 15 |
29/10/2012 | B | 18 |
15/10/2012 | C | 21 |
14/11/2012 | A | 17 |
17/11/2012 | B | 14 |
01/12/2012 | A | 11 |
08/12/2012 | A | 15 |
15/12/2012 | C | 13 |
In the same script (once loaded the table), I need to create three variables which take the average price for Group 'A' for each month. I suppose it should be 'let A_oct=avg(PRICE...' but I do not know how to write the condition. The resulting figures into the variables should be:
A_oct | 14.5 |
A_nov | 17.0 |
A_dec | 13.0 |
How could I write the correct script to do this?
Thanks
You don't need to do it in the script. You can assign it using set analysis in Settings > Variable Overview. To make it easier, I added a Month field to your script. See attached.
You don't need to do it in the script. You can assign it using set analysis in Settings > Variable Overview. To make it easier, I added a Month field to your script. See attached.
Understood. Thank you Rebeca.