Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Danijel
Partner - Creator III
Partner - Creator III

Outer Set Analysis with Master Elements

Hello,

I am currently trying to extend a new master element based on another master element including outer function:

As an example:
Master element 1= Sum({$<Year={2012}>} Sales)
Masterelement 2= {<Country={'Germany'}>} Master Element

The problem, it does not work. As soon as there is a Set Analysis in the upstream master key figure, there is no reaction. As long as I remove it, it works.

Bug or feature?

Thanks and greetings

Labels (2)
7 Replies
Frank_S
Support
Support

Hi @Danijel 

Try this as a single master measure

{<Country={'Germany'}>}Sum({$<Year={2020}>} Sales)

This works.

The set analysis {<Country={'Germany'}>} doesn't work when using the function editor at all.

It works when combining as above.

I believe it is by design.
kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
cristianj23a
Partner - Creator III
Partner - Creator III

Hello, I understand that you want to obtain the sales in the year 2012 of the country Germany. If so, I send you an expression.

Sum({<Year={'2012'}, Country={'Germany'}>} Sales)

 

regarts.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
Danijel
Partner - Creator III
Partner - Creator III
Author

Thank you for the answers.

I already know the suggestions, but I have a "basic formula" that I would like to reuse in other master elements.

Therefore, the suggested methodology is unfortunately of no use to me. I used to implement this with variables and placeholders.

I will create another idea for this.

Vishal_Gupta
Partner - Creator
Partner - Creator

@Danijel I would rather suggest you to use variables and master items in combination.

variables can store your outer set expression, for example:

eOuterExp1 = {<Country={'Germany'}>} 
eOuterExp2 = {<Year={2012}>}

master item can store lowest level of expression without any set analysis, for example: Sum(Sales) 

then combine them for better reusability

$(eOuterExp1)$(eOuterExp2)Master Item

 

 

If a post helps to resolve your issue, please accept it as a SOLUTION and leave a LIKE!
marcus_sommer

Beside of the feature of the master elements I'm not sure if the combination of inner and outer set analysis is possible and also sensible as a general approach. Like by the work with variables the aim is to simplify the development and maintaining and by an overuse it reverts easily into the opposite. Background to these thoughts is the following discussion:

Outer SetAnalysis modifier ignored - Qlik Community - 2108889

Maybe it's related to your scenario.

Vishal_Gupta
Partner - Creator
Partner - Creator

@marcus_sommer I agree with you on this. Also, we usually do not have set expressions defined to a specific year/month or date rather it is relative or dynamic. So having a variable which stores dynamic values reduces the redundancy of creating multiple objects that needs to be maintained.

If a post helps to resolve your issue, please accept it as a SOLUTION and leave a LIKE!
Ravi_Nagmal
Contributor III
Contributor III

@Danijel Try Some thing like this it will work.

{<Year={2012}>} ({<Country={Germany}>} Master Item)