Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have written this expression in a chart but I would like to move it to the script as a new field - it doesn't seem to be working. What could the issue be here?
Many thanks
Dilpreet
i think you missed resident in second load
try below,
after where(session_status)='y' resident FirstTableName group by StudentID
@gilldilpreet Set analysis is a chart expression not a Script expression
can you share a sample data and the expected output ?
Hi Gill,
Set analysis syntax not able to use in Script.
You can try like below.
Load [Session Date], If([Session Date] = Date(Today(),'DD/MM/YYYY') and Sum_AttendedNumeric >=1, 'Y',
If([Session Date] = Date(Today()-1,'DD/MM/YYYY') and Sum_AttendedNumeric >=1, 'Y', 'N')) as [Attended In Last 2 Days];
Load [Session Date], Sum(AttendedNumeric) as Sum_AttendedNumeric resident Report1
where [Session Status] = 'Y'
group by [Session Date];
Note: Based on your screenshot, not able to find the Primary Key.
So above is the sample script, you can include your required field in the load statement and add those in group by.
Hope it helps.
@gilldilpreet try belo
LOAD *,
if((floor([Session Date])<= floor(today()) and floor([Session Date])>= floor(today()-4)) and [Session Status]='Y','Y','N') as FLAG
FROM table
Hi
The primary key is Student ID. I tried the below but got an error...
Thanks for your help!
i think you missed resident in second load
try below,
after where(session_status)='y' resident FirstTableName group by StudentID