Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_skariah
Creator III
Creator III

Aggr Help

Hi all,


Can anyone suggest to solve the following scenario.Attached is the excel file.

I want the following filteration B_Name='Customer',Type='Act',Max of RptPeriod for each KPI code,Min of Level for each KPI code and max(flag_curr) for each KPI code.....with sum of value for each KPI_code.

Find the actual output in excel file attached.

Regards,

Tom

1 Solution

Accepted Solutions
Not applicable

See attached example. By adding the flag you can view the original data if you wish.

View solution in original post

4 Replies
thomas_skariah
Creator III
Creator III
Author

Anyone any help?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the attached exmaple.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Sokkorn
Master
Master

Hi Tom m,

Let try this load script

[Data]:

LOAD

    Selection,

    Year,

    KPI_CODE,

    B_NAME,

    Type,

    RptPeriod,

    Level,

    Flag,

    Flag_Curr,

    Value

FROM

(biff, embedded labels, table is [Input$]) Where B_NAME = 'Customer' and Type = 'ACT';

[MaxRptPeriod]:

Inner Join ([Data])

LOAD

    KPI_CODE,

    Max(RptPeriod)    AS [RptPeriod]

Resident [Data] Group BY KPI_CODE;

[MinLevel]:

Inner Join ([Data])

LOAD

    KPI_CODE,

    Min(Level)    AS [Level]

Resident [Data] Group BY KPI_CODE;

[MaxFlag_Curr]:

Inner Join ([Data])

LOAD

    KPI_CODE,

    Max(Flag_Curr)    AS [Flag_Curr]

Resident [Data] Group BY KPI_CODE;

See the sample attached file.

Regards,

Sokkorn

Not applicable

See attached example. By adding the flag you can view the original data if you wish.