Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community !
I'm trying to create a new table with 2 fields: ID USER and SUM([NUMBER OF LOGIN]). However, when reload the data, the following error message is displayed:
Invalid expression
TOTALLOGIN:
LOAD [ID USER],
SUM([NUMBER OF LOGIN]) AS TOTAL_LOGINS
Resident LOGIN
My database is the following:
ID USER | CHANNEL | NUMBER OF LOGIN |
1 | INTERNET | 4 |
1 | MOBILE | 9 |
2 | INTERNET | 3 |
2 | MOBILE | 3 |
3 | INTERNET | 6 |
3 | MOBILE | 1 |
4 | INTERNET | 5 |
4 | MOBILE | 8 |
5 | INTERNET | 6 |
5 | MOBILE | 8 |
6 | INTERNET | 9 |
7 | INTERNET | 8 |
8 | INTERNET | 8 |
9 | INTERNET | 3 |
10 | INTERNET | 4 |
11 | MOBILE | 10 |
12 | MOBILE | 2 |
13 | MOBILE | 5 |
And my script:
LOGIN:
LOAD [ID USER],
CHANNEL,
[NUMBER OF LOGIN]
FROM
[PRUEBA_1.xlsx]
(ooxml, embedded labels);
TOTALLOGIN:
LOAD [ID USER],
SUM([NUMBER OF LOGIN]) AS TOTAL_LOGINS
Resident LOGIN;
Does someone know why the SUM function is not recognized as valid expression?
Thanks in advance !
Regards,
Vincent
you need group by your dimensions, it means the fields you want to keep
Fabrice
you need group by your dimensions, it means the fields you want to keep
Fabrice
Hi,
Exactly, you just need
Resident LOGIN
Group By [ID USER]
;
Result in attached. Regards.
OMG, I didn't imagine it would be that easy...
Thanks a lot Fabrice!! This sentence works:
TOTALLOGIN:
LOAD [ID USER],
SUM([NUMBER OF LOGIN]) AS TOTAL_LOGINS
Resident LOGIN
Group by [ID USER];
Thanks Pierre !
🙂
Hi Vincent,
Please check the attached qvw. Were you expecting the same results??
Regards,
Varsha
Thanks a lot Varsha. These are the results I was expecting 🙂