Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
SonPhan
Partner - Creator

How to reference Master Dimension

Hello all,

is it possible to reference drilldown (master dimensions)?
Requirement would be e.g. if(...., Drilldown1, Drilldown2)

 

Thank You!

 

Best regards Son

5 Replies
Andrei_Cusnir
Specialist

Hello,

 

If my understanding is correct, you would like to reference the Drill down Master Dimension to know which one is selected at a certain time. One workaround is to use the combination of GetSelectedCount() function with the If().

 

Note: Please keep in mind, that there might be other ways that you can implement this, but this one I have tested and I can confirm that it is working.

 

1. I have created a Drill down master dimension that goes from Country > City > Village

2. Then I have created a Pie chart and used the following expression in the title:

=If(
    
GetSelectedCount(Country) = 0 and GetSelectedCount(City) = 0 and GetSelectedCount(Village) = 0,
    'Dimension Country',
   
If(
     
GetSelectedCount(Country) > 0 and GetSelectedCount(City) = 0 and GetSelectedCount(Village) = 0,
      'Dimension City',
     
If(
       
GetSelectedCount(Country) > 0 and GetSelectedCount(City) > 0 and GetSelectedCount(Village) = 0,
        'Dimension Village',
        'Dimension Village'
      )
    )
)

 

The result is:

SCREENSHOT

SCREENSHOT

SCREENSHOT

 

As you can see, when nothing is selected we are starting from "Country" and the title states "Dimension Country", however when a country is selected, we are now viewing the "City" so the title changes accordingly to "Dimension City". This logic doesn't work 100%, because if you select all the countries then you are still seeing the dimension "Country" but the title will state "Dimension City", so you will have to modify it, by adding additional checks.

 

I hope that this information was helpful. If this was not what you were looking for, please elaborate in detail by providing further details. However, if it has helped you resolve the issue, please mark it as solution to give more visibility to the post for other community members. 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
Or
MVP

Have a look at using GetObjectDimension() to achieve this. I haven't used it but I think it's what you're after.

SonPhan
Partner - Creator
Author

Thank you got your Time!

I am looking dot a Solution where you are Abel to choose between two drill down dimensions 

If 

 

case1: Drilldown1 Country-> City-> village

case2: Drilldown2: Manager -> Teamleader -> Team

 
but anyway Thank you for your Time ! 

Andrei_Cusnir
Specialist

Hello,

 

I believe that the closest you can get to your use case scenario (natively) is to use the first drill-down as Dimension and the second drill-down as Alternative Dimension. This will allow you to select values and go through the drill-down dimensions list, while it will also allow you to change the drill-down master dimension. If you are looking for a more advance solution or a function that will return to you a specific value that you are going to use for further checks and more complex scenarios, then you will have to submit a feature request [1].

 

 

I hope that the information is helpful

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1... 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
Or
MVP

Good approach there...

Other options (depending on the object types) would be to use a show/hide container or to use show/hide at the column level (e.g. in a table), but all of these work around the fact that the reference to a master dimension can't be made directly.