# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor II

## Problem with group by clause

Hi,

I have the following code in a script:

ID_COMMERCIAL_SITE,

ID_PROVIDER,

RECEPCION_DATE,

SUM(NUM_LECTURAS)  AS IND_EFICIENCIA

RESIDENT LECTURAS

GROUP BY

ID_COMMERCIAL_SITE,

ID_PROVIDER,

RECEPCION_DATE

I'm not getting aggregated data as you can see below:

ID_COMMERCIAL_SITE,  ID_PROVIDER,  RECEPCION_DATE,  IND_EFICIENCIA

 49255,46747,2015-04-07,7 49255,46747,2015-04-07,7 49255,46747,2015-04-08,7 49255,46747,2015-04-01,7 49255,46747,2015-04-01,7 49255,46747,2015-04-01,7 49255,46747,2015-04-30,7

What I'm doing wrong?

Thank you very much.

1 Solution

Accepted Solutions
MVP

## Re: Problem with group by clause

Is your RECEPCION_DATE a date field of timestamp field? May be you need to use Floor function to make it date.

ID_PROVIDER,

RECEPCION_DATE,

SUM(NUM_LECTURAS)  AS IND_EFICIENCIA

GROUP BY   ID_COMMERCIAL_SITE,  ID_PROVIDER, RECEPCION_DATE;

ID_PROVIDER,

Date(Floor(RECEPCION_DATE)) as RECEPCION_DATE,

NUM_LECTURAS

RESIDENT LECTURAS

3 Replies
MVP

## Re: Problem with group by clause

Is your RECEPCION_DATE a date field of timestamp field? May be you need to use Floor function to make it date.

ID_PROVIDER,

RECEPCION_DATE,

SUM(NUM_LECTURAS)  AS IND_EFICIENCIA

GROUP BY   ID_COMMERCIAL_SITE,  ID_PROVIDER, RECEPCION_DATE;

ID_PROVIDER,

Date(Floor(RECEPCION_DATE)) as RECEPCION_DATE,

NUM_LECTURAS

RESIDENT LECTURAS

New Contributor II

## Re: Problem with group by clause

Thank you very much.

My script is working ok now.

MVP

## Re: Problem with group by clause

Awesome, I am glad I was able to help