Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
alexis
Partner
Partner

Multiple calendar and aggregation problem

Hi all,

I am sure this is a common problem - let me explain. In the diagram below you can see that I am using 3 separate calendars one each for Deliveries, Orders and Shipments.

MultipleCalendars.jpg

In the "blue" table (below) I am combining "Orders" (from the Order Calendar) and "Deliveries" from the "Delivery Calendar" (both shown in yellow) using the Dimension "Month Year" from an unconnected calendar called "Calendar" (shown in pink above) and then using syntax of the type:

aggr(

    if(MonthYear = [Order MonthYear],

        sum(Orders.Counter)

    ) ,MonthYear ,[Order MonthYear]) for "Orders" and


aggr(

    if(MonthYear = [Delivery MonthYear],

        sum(Orders.Counter)

    ) ,MonthYear ,[Delivery MonthYear]) for "Deliveries"

MultipleCalendarsExample.jpg

So far so good - all works fine and the numbers are correct.

Choosing a "Country" from the list box yields the correct results in the blue table.

My requirement, however, is to extend the "blue" table to show Orders and Deliveries for each country for every month (see pink table above). The resultant pivot table is incorrect - any help would be most appreciated. I attach the above demo application with data.

Best regards

Alexis

1 Solution

Accepted Solutions
bhagirath
Creator III
Creator III

Hi ,

Can you check the attached qvw hope this solves your problem

View solution in original post

3 Replies
bhagirath
Creator III
Creator III

Hi ,

Can you check the attached qvw hope this solves your problem

alexis
Partner
Partner
Author

As simple as that - and here was me looking for a more complex solution.

Thank you very much Bhagirath.

Best regards

Alexis

bhagirath
Creator III
Creator III

that's because your aggr function was running on only one dimension and in chart you were looking for data with respect to both the dimensions..

Good to know that this solves your problem...

Cheers...!!!

Bhagirath