Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help in using Aggr Function

Hi All,

I have the sales data at State level and Regions is mapped to state as below

StateRegionSales
S1R110
S2R220
S3R130
S4R240
S5R150

and i have to show a straight table in qlikview like below

StateState SalesRegional Sales
S11090
S22060
S33090
S44060
S55090

I created a table with dimension as 'State' and created two expressions as below

1. 'Sum(Sales)' to show State Sales

2. 'Sum(aggr(Sum({<State=>}Sales),Region))' to show Regional sales

But the aggr function is showing aggregated value for one state per region and rest of the values it is showing 0's.

Here is the output am getting

StateState SalesRegional Sales
S11090
S22060
S3300
S4400
S5500

Is there anything wrong with the expression that i used for Regional Sales? Please somebody help me to get the regional values for every state.

Thanks,

Manu

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try: aggr(nodistinct sum(Sales),Region)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

Try: aggr(nodistinct sum(Sales),Region)


talk is cheap, supply exceeds demand

View solution in original post

Not applicable
Author

Thanks wassennar, it is working.

Not applicable
Author

Hi wassenar,

I am facing one more problem, It'll be helpful if you suggest a solution.

I created a bookmark as 'BM01' and i am updating this bookmark on click of a button. For button i added a replace bookmark action.

This functionality is working fine in qlikview desktop but after deploying in server, the bookmark is not getting replaced.

Is there any policy/settigs need to be changed?

Thanks,

Manu

Gysbert_Wassenaar

The document is always read-only on the server. That means document bookmarks can't be replaced. You'll have to enable Server Bookmarks instead on the server. In the QMC go to Document Properties -> Server -> Server Objects and enable both "Allow Server Objects" and  "Allow Server Bookmarks". Users can then create and replace their own bookmarks.



talk is cheap, supply exceeds demand
Not applicable
Author

Both are already enabled but still the Document Bookmarks (BM01) which i created is not getting replaced. More over if you open the application on server, i am not getting options to replace document bookmark, i can only replace 'My Bookmarks'

Actually i created one document bookmark and i wanted user to replace the same bookmark if he wants.

I created a button in the application to replace this document bookmark. Is there any option to replace document bookmarks dynamically?

Not applicable
Author

Wassenar,

I understood that we can't replace document bookmarks on server, but is there any way to replace server bookmarks on click of button without using macros.

Thanks for your help,

Manu