Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
davetrentwipro
Partner - Contributor II
Partner - Contributor II

Displaying "generalized results" in a map object - calculated dimension limitation

I have a use case where locations have parent/child attributes and I need to display the entire family (parent and its children) in a table and map object.

(A more general related use case would be displaying all related locations in some region for a selected location.   I picked a Home Depot, show me all others in the same STATE.  A VERY useful visualization for a map, but not what the user explicitly selected!)

I can successfully create a table using calculated dimensions, but the map object doesn't allow it.  [aggr() doesn't permit "calculated dimensions" as per help and I assume the map performs a virtual aggr() and hits the same constraint?]

For context, one part of my set analysis syntax which requires only one Location to be selected:
sum({1<[Parent]=P({<[Location]={$(=Only([Location]))}>}[Parent]), [Location]=>} [My Variable of Interest])

There was a great post here that suggested "IF"ing the calculated dimension as a workaround, but I don't see how to apply it in this instance.

Any suggestions? 

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

i took a different approach , which will simplify your calculation 

i created a new field called parentNumber , where if a Scml id don't have a parent he becomes his own parent.

now if you select value in this field you can see on the map both parent and childs and there is no need to complex calculations . 

have a look at the attach file .

in general i try to stick to this mantra : 

if something isn't simple , it simply won't be

View solution in original post

4 Replies
lironbaram
Partner - Master III
Partner - Master III

Hi

you can use calculated dimension using aggr function in the map Object 

can you share your full function you want to use aggr to warp around 

 

davetrentwipro
Partner - Contributor II
Partner - Contributor II
Author

Thanks for the assistance!

I stripped down the app and provided some example data.

The "full function":  Its in the bottom Parent/Child table in two parts: Square Foot column has two different sets of calculations depending on if a parent or child is selected.  The "full function" would be a combination of these.

The map in the app just shows the selected location (SCML ID) currently.  Goal is to display the same locations as the lowest table.  (The four tables in the middle just show the pieces parts of the "full equation" for reference)

Again many thanks!

 

lironbaram
Partner - Master III
Partner - Master III

hi 

i took a different approach , which will simplify your calculation 

i created a new field called parentNumber , where if a Scml id don't have a parent he becomes his own parent.

now if you select value in this field you can see on the map both parent and childs and there is no need to complex calculations . 

have a look at the attach file .

in general i try to stick to this mantra : 

if something isn't simple , it simply won't be

davetrentwipro
Partner - Contributor II
Partner - Contributor II
Author

Note: Accepted solution doesn't meet customer requirement of selecting a single parent or child location.  Did incorporate hidden field of having new "parent" field reference all parent/child sites to simplify parent/child set analysis solution.  Liked elegance of response and since my requirement was unclear and response otherwise satisfied I accepted the solution.

Since then our customer's platform upgraded to a version of QS that now supports alternate states.  We used that design mechanism to (mostly) address the updated problem statement of selecting any parent-child site to display the family.  The approach had a shortcoming acceptable to the client of not being able to have selected sites act as a filter given they were in a different state.