Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Compare to Company Total

Hello all,

Having a little issue with this:  I need to keep my company total no matter what the user selects.  I will also have to publish using a loop and reduce and keep the company total of 5000 in each model from the reduce.  Any ideas?  Level 1 is the company and Level 2 is the region.

                       Company                  Region                      %

North                5000                         2500                        50

South                5000                         2000                        40

East                  5000                           250                         5

West                 5000                           250                         5

Here is the calculation I am using;

Max((aggr(Sum(TOTAL{<Level2=,Level3=,Level4=,[PC Desc]=,FISYR = {$(=$(vFisYr) - 0)},[GL Hier 1] = {[ZMR Chart of Accounts]}, YTDFlag = {1},[HighNode] = {'ZMR_GROSS2'}>} [In company code currency_HSL] * -1),Level1))) 

3 Replies
Anil_Babu_Samineni

May be explain more your intend to show? So that we may understand to trigger the issue

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

To overcome the issue, you can create an additional field in the script having company total across all regions. Try like:

Input:

Load

          *

From <>;

join

Load

          Region,

          Sum(Sales) as CompanySales

Resident Input Group By Region;


Now even if you reduce and distribute the application region wise, all your regions have CompanySales individually.

sdmech81
Specialist
Specialist

plss attach sample file.

Is it u just want sum of company which should nt act as per selection.

Sachin