Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group By

Hola a todos,

Estoy intentando hacer una inner Join entre dos tablas y agrupar después el resultado:

Usuario:

LOAD Id as IDUsuario__c,

          Username;

SQL SELECT Id,

          Username,

FROM User;

Inner Join (Usuario)

  

Comentario:

LOAD CreatedById as IDUsuario__c,

          Count(Id) as Num;

SQL SELECT CreatedById,

          Id

FROM UserFeed

Group By CreatedById;

Me dice que agrupe también por el Id de la tabla Comentario, pero si pongo Group By CreatedById,Id tampoco funciona. No sé porqué no me salen datos.

Podéis ayudarme?

Gracias

César

12 Replies
Not applicable
Author

Hi,

First, thanks smqlikview.

I think this error is because i'm consulting on a Force.com database. Well, now i'm here:

Comentario:

LOAD CreatedById;      

SQL SELECT CreatedById , count (Id)  NumeroTotal

FROM UserFeed Group By CreatedById;

It does the filter but don't write anithing in the table.

Thanks

Cesar

smqlikview
Contributor II
Contributor II

Hi Cesar:

If you have loaded another table with the same data structure (that is, a table with CreatedByID as its sole column), then Qlikview might be appending the rows returned by the SQL to that table. You can try one of these two options to check if that is happening:

1. Create a new qvw and in its script just have this statement. See if that is creating the table. If it does not show the rows you are looking for, then probably the error is in the select statement. I do not know much about force.com to guide you on it. But your sql statement looks right. You can try removing the "SQL" before "select" and execute the script in the new qvw, and see if that works.

2. Second option is, add "noconcatenate" (in your current qvw script; no need to create a new one), as shown below:

    Comentario:

    NOCONCATENATE

    LOAD CreatedById;      

    SQL SELECT CreatedById , count (Id)  NumeroTotal

    FROM UserFeed Group By CreatedById;

Goodluck.

Not applicable
Author

Hi smqlikview,

I did both and failed both too. I think that Group By do not run with qlikview (salesforce) connector.

Thanks,

Cesar