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: 
deep2021
Creator III
Creator III

summation on the basis of results that getting from precalculated formulae (Total function )

Hi,

 

I am getting right results by using the below formula,

(Sum(Total<Dim_1,Dim_2,Dim_3>sales)
/
Sum({<Dim_2=,Dim_1=>}Total<Dim_3>sales)
)* (Sum(Total<Dim_1,Dim_2,Dim_3,Dim_D>{<flag={'P'},Period*={'Current Year'},date *= {"$(=max(date))"}>}sales)/
Sum(Total<Dim_1,Dim_2,Dim_3,Dim_D>{<Period*={'Current Year'},date *= {"$(=max(date))"}>}sales))

 

Now, I need summation of the results getting from above formula w.r.t Dim_D and Dim_3 (group by Dim_D and Dim_3).

 

I want to use Total<Dim_D ,Dim_3 > for the output on the basis of above formula.

The final expression I need to like below,

sum(Total<Dim_D ,Dim_3 > above expression)

 

Can you please suggest on this?

 

thanks

Labels (6)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Use AGGR(), as below

 

=SUM( AGGR (

(Sum(Total<Dim_1,Dim_2,Dim_3>sales)
/
Sum({<Dim_2=,Dim_1=>}Total<Dim_3>sales)
)* (Sum(Total<Dim_1,Dim_2,Dim_3,Dim_D>{<flag={'P'},Period*={'Current Year'},date *= {"$(=max(date))"}>}sales)/
Sum(Total<Dim_1,Dim_2,Dim_3,Dim_D>{<Period*={'Current Year'},date *= {"$(=max(date))"}>}sales))

,Dim_D,Dim_3 ) )

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

5 Replies
deep2021
Creator III
Creator III
Author

Hello experts,

can you please suggest on this?

thanks

vinieme12
Champion III
Champion III

Use AGGR(), as below

 

=SUM( AGGR (

(Sum(Total<Dim_1,Dim_2,Dim_3>sales)
/
Sum({<Dim_2=,Dim_1=>}Total<Dim_3>sales)
)* (Sum(Total<Dim_1,Dim_2,Dim_3,Dim_D>{<flag={'P'},Period*={'Current Year'},date *= {"$(=max(date))"}>}sales)/
Sum(Total<Dim_1,Dim_2,Dim_3,Dim_D>{<Period*={'Current Year'},date *= {"$(=max(date))"}>}sales))

,Dim_D,Dim_3 ) )

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
deep2021
Creator III
Creator III
Author

Hi Vineet,

 

Thanks for the reply. But this is not showing the correct results.

 

 

Thanks

vinieme12
Champion III
Champion III

can you post a sample app with dummy data?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
deep2021
Creator III
Creator III
Author

Total function with above function is working fine for me.

 

thanks