Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vishuraina
New Contributor II

Aggregation Table

Hi Community members,

Need urgent help on the below.

I have to create a table in which i need division of some aggregated columns.

ProductMetricFrontBackSide
1aSales5254.52456.5714292017.928571
2aInc260.39%121.74%100.00%

The ask :

We have 2 dimensions - one is the Product (a) and the other being the product position (front, back , side)

I have the sum of sales for the product "a" over the product positions(front, back , side) as given in row 1.

I want to find out the percentage as in row 2 which is sales /min(sales) for each cell. Denominator would be Min sales value across product positions per product (from row 1) and the respective sum of sales would be the numerator.


Ex. 260.39% =5254.5/2017.92, 2017.92 being the min sales.

Note : Table format isn't imp, just need a way to form a similar value table.

1 Solution

Accepted Solutions
agigliotti
Honored Contributor II

Re: Aggregation Table

maybe this:

Sum(sales)/Min(total <product> aggr(Sum(sales),product,position))

5 Replies
agigliotti
Honored Contributor II

Re: Aggregation Table

could you provide a sample app with mock data ?

however maybe try this:

dimension: position, product

measure for Inc :

sum(sales)/min( aggr( sum(sales), product ) )

lironbaram
Honored Contributor II

Re: Aggregation Table

HI

this expression should work for you

sum(Sales)/aggr(nodistinct min( aggr( sum(Sales),Type)),Product)

kaanerisen
Contributor III

Re: Aggregation Table

Hi Vishal,

How about this.

Inc. Measure : Sum(Sales)/Min(total aggr(Sum(Sales),Product,Part))

Sample data:

Untitled.png

Table Properties:

Untitled2.png

Output:

Untitled3.png

agigliotti
Honored Contributor II

Re: Aggregation Table

maybe this:

Sum(sales)/Min(total <product> aggr(Sum(sales),product,position))

vishuraina
New Contributor II

Re: Aggregation Table

Thanks a lot, have been breaking my head over it. Works perfectly.

Community Browser