Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Quarterly KPIs Calculation

Hello Guys I have ,

I have a monthly Achievement Data as the below example(of caurse multiple branch is available in my data set)

Branch            Date              Achievement

002               01-2017            95          

002               02-2017            96

002               03-2017            94

002               04-2017            90

Output:

Branch            Date              Achievement

002                 Q1                   95       (Average of the three months)       

002                 Q2                    90     (since the available month in Q2 is April so the average Achievement is 90)

I Need to calculate the above in the script

Hope that you can help.

Thank you,

3 Replies
Anil_Babu_Samineni

May be this?

Avg(TOTAL <Date> Achievement)

OR

Above(Avg(Achievement),0,3)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mario-sarkis
Creator II
Creator II
Author

Hi Anil ,

is the expression for the Script?"

I need to calculate it is the script

Thank you

Frank_Hartmann
Master II
Master II

try this:

1:

Load *,

'Q' & Ceil(Month(Date#(Date,'MM-YYYY'))/3) AS CalendarQuarter;

LOAD * INLINE [

  

    Branch,            Date,              Achievement

    002,               01-2017,            95        

    002,               02-2017,            96

    002,               03-2017,            94

    002,               04-2017,            90

];

NoConcatenate

2:

Load

CalendarQuarter,

Branch,

avg(Achievement) as avg

Resident 1

Group by CalendarQuarter,Branch;drop Table 1;

hope this helps