Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, hope someone can help me here, I'm getting an "Invalid expression" message with a line in my script and I can't see what's wrong.
For each area I want to count the number of times each distinct CODE_NUMBER is present when the STOCKSTATUS = SOLD
Thanks in advance
TMP_COUNT:
LOAD ID_NO,
count(CODE_NUMBER) as CODE_COUNT
Resident UNITS where STOCKSTATUS = 'SOLD' group by CODE_NUMBER, AREA;
You should use the Group by ID_NO.
QV Help example:
Grouping data
Load ArtNo, round(Sum(TransAmount),0.05) as ArtNoTotal from table.csv group by ArtNo;
Load Week, ArtNo, round(Avg(TransAmount),0.05) as WeekArtNoAverages from table.csv group by Week, ArtNo;
You should use the Group by ID_NO.
QV Help example:
Grouping data
Load ArtNo, round(Sum(TransAmount),0.05) as ArtNoTotal from table.csv group by ArtNo;
Load Week, ArtNo, round(Avg(TransAmount),0.05) as WeekArtNoAverages from table.csv group by Week, ArtNo;
You need to include ID_NO in the Group By.
TMP_COUNT:
LOAD AREA,
count(CODE_NUMBER) as CODE_COUNT
Resident UNITS where STOCKSTATUS = 'SOLD' group by AREA;
Hi, ID_NO is my transaction ID and I want to count across all transactions not Individual ones as there is only ver 1 code per transaction, therefore that will only ever bring me back a 1
Thanks
Hi,
then comment ID_NO from the table.
Regards
Hi Simon
You don't need ID_No in your load statement
LOAD
AREA,
CODE_NUMBER,
count(CODE_NUMBER) as CODE_COUNT
Resident
UNITS
where
STOCKSTATUS = 'SOLD'
group by
AREA,
CODE_NUMBER;
Makes sense now, thank you guys