Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jaswantc
Creator II
Creator II

Aggr Function in Straight table on another expression value by different Dimension

Hi All,

Can some body advice me can we use Aggr function on another expression value within straight table by different dimension.

Here it my usecase.

My Input:

My Expected Straight table O/P :

Here i am trying to aggregate Column(Amt) value by Product, Quarter and expected value is same as "AGGR at Quarter" expression.

but instead of Aggr(Sum(AMt),Product,Quarter) i used Aggr(Sum(Column(1)),Product,Quarter).

Can you some body let us know is it possible to reference column name in Aggr function?

Attached sample App.

1 Solution

Accepted Solutions
jaswantc
Creator II
Creator II
Author

Thanks you all.

I am able to achieve with below expression.

If( QuarterStart(MakeDate(Year,Month)) = MakeDate(Year,Month),RangeSum(Below(Column(27),0,3)), Above(Column(30)))

Basically i am checking Quarter Start and if it matches then using RangeSum function with below function to aggregate forward 3 records amount.

Thanks,

View solution in original post

8 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

to the best of my knowledge you can't

use column function inside aggr ,

and generally you can't use an expression result in one table in another table

Kushal_Chawda

Sample app is not attached

jaswantc
Creator II
Creator II
Author

Hi Kush,

Attached sample app.

Kushal_Chawda

Use Sum(total <Product,Quarter>AMt)

This is what you are looking for? See the attached

jaswantc
Creator II
Creator II
Author

Hi Kush,

Thanks for looking

In Mycase i wanted to use Column(1) or Expression Name instead of Actual field "AMt" because in real scenario Amt is derived value.

Kushal_Chawda

So you can do that calculation in script using If else and then use that Amout

Kushal_Chawda

How amount is derived ?

jaswantc
Creator II
Creator II
Author

Thanks you all.

I am able to achieve with below expression.

If( QuarterStart(MakeDate(Year,Month)) = MakeDate(Year,Month),RangeSum(Below(Column(27),0,3)), Above(Column(30)))

Basically i am checking Quarter Start and if it matches then using RangeSum function with below function to aggregate forward 3 records amount.

Thanks,