Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Straight Table Calculations

I have a straight table and what to SUM() what is selected within a list box. However, within the list box is only each divisions name, such as Finance, HR, etc. When I originally imported my data from each division I used qualify, thus for a given metric such as PLAN, the field is named Finance.PLAN or HR.PLAN. Thus within my straight table I want to sum PLAN and FORECAST individually. In order to do this I have written the following, however I keep getting an error message that states: Error: Error in expression: Nested aggregation not allowed. Is there anyway to script what I'm trying to do?

=Sum(Concat(getfieldselections([Divisions])&' .Plan'))

1 Solution

Accepted Solutions
krishna_2644
Specialist III
Specialist III

See attached files.

let me know if you have any questions

View solution in original post

24 Replies
krishna_2644
Specialist III
Specialist III

Not sure you want this kind but See attached doc.

Capture1.PNG

Capture2.PNG

Capture3.PNG

Not applicable
Author

Yes, however, when I select the division, it sum() the PLAN for every metric, when in actuality I want to select a division, and when selected it will compute PLAN for each metric in separate rows of the straight table

krishna_2644
Specialist III
Specialist III

post some sample data.

krishna_2644
Specialist III
Specialist III

Any luck?

Not applicable
Author

No, still no luck, I have 10+ divisions, and only want them to display 2-3 calculations only when selected

krishna_2644
Specialist III
Specialist III

post some sample data.

Kushal_Chawda

I didn't understand your question. Can you please explain with example

mvanlutterveld
Partner
Partner

Hi Michael.

IMHO The solution should be in the script and not in the front end calculations. Create a fact table with all the metrics you need and the key fields to the dimensional tables like Division, Calendar. Advantage of this approach is that you don’t have to qualify your fields.

Cheers,

Michiel

Not applicable
Author

Its a bit difficult to post all the data but a screenshot is below. Here is what I am trying to accomplish:

1) Limit selections within Divisions to one, and once one is selected it dynamically updates the straight table

2) When the division is selected, the straight table will display that divisions metrics, in addition to the plan, actual, and forecast for each respectively

3) Each division and metrics are in separate tables, thus have been qualified, so something needs to follow along the lines of

=IF(GETSELECTEDCOUNT([Divisions]) =0,0, CONCAT(GETFIELDSELECTION([Divisions])&' Data.Metric')