Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
m_irfan360
Creator
Creator

Monthly Avg balance

I have daily balances in my table as following

Key Date
Balance
109/01/201210
109/02/201210
109/03/201210
109/04/201220
109/05/201220
109/06/201220
109/07/201220
109/08/201220
109/09/201215
109/10/201215

now the thing is i wana calculate avg weekly monthly and quarterly balance the formula i am using is sum(AGGr(avg(Balance),Week) and when i use the same for the month it shows the same value as in sum(AGGR(AVG(Balance),CalenderMonth) so please guys let me know where i am going wrong.

1 Solution

Accepted Solutions
m_irfan360
Creator
Creator
Author

Finally its done guys hope it helps others

View solution in original post

5 Replies
swuehl
MVP
MVP

Week and CalendarMonth are fields in your data model derived from Date?

Where / in which context are you using these expressions?

A small sample file QV file might help to understand your issue.

RedSky001
Creator III
Creator III

Something like this:

load *

,WeekName(Date) as MyWeekName

,QuarterName(Date) as MyQuarterName

,MonthName(Date) as MyMonthName

;

LOAD Date(Date) as Date,

     Balance

FROM

(biff, embedded labels, table is Sheet1$);

Then you cna use the following:

=Avg(Aggr(sum(Balance),MyWeekName))

=Avg(Aggr(sum(Balance),MyQuarterName))

=Avg(Aggr(sum(Balance),MyMonthName))

Mark

m_irfan360
Creator
Creator
Author

This only works if  i  don't select a date but when i select a date it shows the same value for all the keys i.e if there is 1,2,3 it will show the same value for 1,2,3.

1,2,3 can be values in the column name KEY.

RedSky001
Creator III
Creator III

As per swuehl's comments can you provide more informaiton.  If you could answer his quesitons and also include the actual document that would be usefull.

Mark

m_irfan360
Creator
Creator
Author

Finally its done guys hope it helps others

View solution in original post