Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr + Set Analysis in Product's Stock Calculation

Hi!

I'm working on a report wich should show stock information.

It contains Information about Stores, Price Range, and a Grouping attribute based on the product category.

The idea is that you can input how many units of a Product you need to send to a Store.

One of the aggregations i'm trying to calculates is the total of products Aggregated by Category, Store and PriceRange.

The problem is that it only works properly when I select a Store. When there are no Selections, it doesn't show the right numbers.

I'm using the next expression (as I need it to repeat the aggregated stock values in every row):

aggr(nodistinct max(TOTAL STOCK), CATEGORY, STORE, PRICE RANGE) + Aggr(nodistinct InputSum(SEND), CATEGORY, STORE, PRICE RANGE).

Thanks in advance!

Agustín.-

1 Reply
yvesqlik
Partner - Contributor III
Partner - Contributor III

Try:

- put a set analysis in the expression STORE=:

aggr(nodistinct max({<STORE=>} TOTAL STOCK), CATEGORY, STORE, PRICE RANGE) + Aggr(nodistinct InputSum({<STORE=>} SEND), CATEGORY, STORE, PRICE RANGE)