8 Replies Latest reply: Oct 27, 2017 9:05 AM by Peter Cammaert RSS

    Section Access on Multiple dimensions

    Divya Bharathi C T

      Hi,

       

      I have a section access requirement like this


      If ACCESS = Admin, then grant full access to NTNAME ( access to all Levels- Level 1, Level 2, Level 3, Level 4)

       

      If ACCESS = USER, then grant access to NTNAME as per Level 4 (make sure it has some value)

      If Level 4 is empty then then grant access to NTNAME as per Level 3 (make sure it has some value)

      If Level 4 & Level 3  are empty then then grant access to NTNAME as per Level 2 (make sure it has some value)

      If Level 4 & Level 3 &  Level 2 are empty then then grant access to NTNAME as per Level 1


      My data is a single excel sheet and each level has some distinct values (say 200). How to handle this ?



      Thanks,

      Divya

        • Re: Section Access on Multiple dimensions
          Peter Cammaert

          No idea what these Levels represent or how they are used in your data model. Maybe you can attempt a solution like specified below. If no, please provide more details about your document or upload a representative sample qvw.

           

          • Create a field containing a concatenation of Level1 Level2 Level3 Level4. If any of the later levels are NULL, then stop at the next lower level. Every fact record should have one field value.
          • Add these field values to your SA table, or if the mix is too complex, create a translation table in Section Application that maps User IDs to all levels to which access should be granted.

           

          Best,

           

          Peter

            • Re: Section Access on Multiple dimensions
              Divya Bharathi C T

              Hi Peter,

               

              Level hierarchies starting from Level 1 down to Level 4. We can visualize these levels as below, meaning if there is no Level 1 (Country) there cannot be other Levels (Region, State, City)

                

              Level 1Country
              Level 2Region
              Level 3State
              Level 4City
                • Re: Section Access on Multiple dimensions
                  Peter Cammaert

                  As with everything in QlikView and due to the explicit-value-linking-associative logic of QlikView, you cannot select *nothing* (i.e. NULL) in the User Interface. Nor can you connect SA permissions to *nothing*. If you subsequently reduce your document, all those values will get thrown out anyway.

                   

                  Replace them with some default value, like 'missing' or 'unknown'. If you don't like those values to appear in your listboxes and other objects, create Level X field copies in which you replace *nothing* with the selected default string value. Then create the concatenated Level X path from those values.

                  • Re: Section Access on Multiple dimensions
                    Tim Stemmer

                    Sounds like the 4 Levels are part of a hierarchy in a tree structure. You could add a field where you calculate the number of childs for each item, and than grant access to items with 0 childs only, the leaf level items.

                  • Re: Section Access on Multiple dimensions
                    Divya Bharathi C T

                    Am posting a sample data of my requirement.

                    there are two excel sheets.

                    one is Data - Data.xlsx - contains users data

                    other one is Section Access file - Section Access Data.xlsx - this tells which user should access what.

                       

                    ACCESSNTNameLevel 1 (Country)Level 2 ( Region)Level 3 ( State)Level 4 (City)
                    ADMINA
                    ADMINB
                    USERCAtlanta
                    USERDRajasthan
                    USEREPatna
                    USERFNorth
                    USERGJapan
                    USERHKyushu

                     

                    Consider the above table.

                    If ADMIN - Grant full access to all Country, Region, State, City

                    If  USER check for below scenarios

                    • Check if he has an entry in City, if yes grant access to that City. say USER C must see only Atlanta data
                    • If city is null, then check if he has an entry in State, if yes grant access to that State. USER D must see only Rajasthan Data
                    • If both City and State is null, then Check for Region, if he has an entry in Region, then grant access to that Region. USER F must see only North Region Data
                    • If City, State, Region is null, then go for Country check and grant access to that Country data.

                     

                     

                    Thanks,

                    Divya

                      • Re: Section Access on Multiple dimensions
                        Peter Cammaert

                        Still, an important distintion is left undefined.

                         

                        If both City and State is null, then Check for Region, if he has an entry in Region, then grant access to that Region. USER F must see only North Region Data

                        Should USER F have access to all North reqions in all countires? If Yes, then there are 16 possible connections for every facts record. If No, then there are only 4.

                          • Re: Section Access on Multiple dimensions
                            Divya Bharathi C T

                            No he should see only North region data of his Country, which is Japan

                              • Re: Section Access on Multiple dimensions
                                Peter Cammaert

                                So all lower levels are always specified (although they are not in your example). For example, to which country does Atlanta belong to according to your Section Access data? Also Japan? Because that's the only country available in your Excel data source...

                                 

                                If you expand your Section Access Data.xlsx source file to include values for all lower levels, then we create 5 mapping records for each row in Data.xlsx (Number of Level columns+1). For row 10 this set becomes (assuming imaginary wildcards for all missing level values):

                                 

                                1= /Japan/North/Hokkaido/Otaru

                                2= /Japan/North/Hokkaido

                                3= /Japan/North

                                4= /Japan

                                5= /

                                 

                                Since USER F will have a corrected SA specification of

                                 

                                /Japan/North

                                 

                                we are able to connect USER F to row 3 of your mapping data. USER A qnd USER B will be linked to mapping data row 5 and they will see this Data row as well. The others won't because there is no match.

                                 

                                NOTE: as I already stated before, you will have to merge all Level values into a single consistent Level Patch field for this mechanism to work. Of course, you are free to leave the original Level X fields as they are.