Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
bharatkishore
Contributor III

Group By issue

Hi All,

I have the following table.

NR:

LOAD Country as Country_NR,

    

     Modality as Modality_NR,

     Entitlement,

     Date(Makedate((LEFT(Period,4)),(Right(Period,2)),01),'MM/DD/YYYY') AS Period_NR,

     Date(Makedate(LEFT(Period,4)),'YYYY') as Year_NR,

     Date(Makedate((LEFT(Period,4)),(Right(Period,2)),01),'MMM') as Month_NR,

     Year,

    

     [% NORMIB],

     Consumption

    

FROM

[..\QVD\NR.qvd]

(qvd);

Now in the second table when i load:

SC:


LOAD Month_NR,

Year_NR,

Entitlement,

Country_NR,

Modality_NR,

'1' as KPIScope,

sum(Consumption) as Numerator,

sum([% NORMIB]) as Denominator

  

Resident NR

 

Group By Month_NR,

Year_NR,

Entitlement

;


I am getting error as invalid expression.


Can you please help me where i am doing wrong.


Thanks,

Bharat

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Group By issue

You need to add ALL the fields that are NOT aggregated to the Group By clause. In your case that means Country_NR and Modality_NR.


LOAD

     Month_NR,

     Year_NR,

     Entitlement,

     Country_NR,

     Modality_NR,

     '1' as KPIScope,

     sum(Consumption) as Numerator,

     sum([% NORMIB]) as Denominator

Resident

     NR

Group By

     Month_NR,

     Year_NR,

     Entitlement,

     Country_NR,

     Modality_NR

     ;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
MVP & Luminary
MVP & Luminary

Re: Group By issue

You need to add ALL the fields that are NOT aggregated to the Group By clause. In your case that means Country_NR and Modality_NR.


LOAD

     Month_NR,

     Year_NR,

     Entitlement,

     Country_NR,

     Modality_NR,

     '1' as KPIScope,

     sum(Consumption) as Numerator,

     sum([% NORMIB]) as Denominator

Resident

     NR

Group By

     Month_NR,

     Year_NR,

     Entitlement,

     Country_NR,

     Modality_NR

     ;


talk is cheap, supply exceeds demand

View solution in original post

Highlighted
bharatkishore
Contributor III

Re: Group By issue

Thanks a lot... Sorry i missed........

MVP & Luminary
MVP & Luminary

Re: Group By issue

No problem. It's a mistake most of us make at least once. I certainly have several times.


talk is cheap, supply exceeds demand