4 Replies Latest reply: Dec 2, 2011 8:04 AM by Sergio Alonso Bueno RSS

    calculated dimensions & getfieldselections

      Hi all,


      I´ve been working with basic calculated dimensions.


      =if( isnull(date(DATAHORAENVIO)),date(DATAHORAFECHAMENTO),date(DATAHORAENVIO)) works fine and others like that.


      i now want to use the getfieldselections with it, has any one experience??.

      I WOULD LIKE TO "PASS" to the table the dimensions CONVENIO chosen dinamically, so what is selected is used to calculate the dimension CONVENIO2.



      =if(CONVENIO2 = '$(getfieldselections (CONVENIO),',')',CONVENIO2,NULL())


      gives a (Expresion OK) but //error in dimens on the pivot table



      Any ideas?

      IS this possible ?


      Thanks in advance

        • calculated dimensions & getfieldselections
          Stefan Wühl



          =aggr(only({<CONVENIO2=CONVENIO>} CONVENIO2), CONVENIO2)


          Hope this helps,


            • calculated dimensions & getfieldselections

              Thanks Stefan,


              It is not working  on the calculated dimension either on a text box.


              I forgot to say is QV 8.5, when these were launched.


              Any other idea.?


              Thank on advance



                • calculated dimensions & getfieldselections
                  Stefan Wühl

                  Hm, I haven't worked with 8.5 too much, so I am not quite sure what the limitations are.


                  I assume set analysis is not working well, but I hope something like this might work (it works with QV10)


                  =if(WildMatch(GetFieldSelections(CONVENIO),'*'& CONVENIO2 &'*'),CONVENIO2,NULL())




                    • calculated dimensions & getfieldselections



                      Thank you very much.


                      This was the way.

                      I will explain the situation to make it more clear for the QLIKCOMMUNITY.


                      In order to avoid circular refernces i loaded twice the same dimension (well one was mapping).


                      Every thing OK when using them  in diferent pages.


                      But when you need to calculate stuff of the second one in the same page, and the shown (selectable) dimension is the first one.??????


                      I created a calculated dimension on the pivot table of the second dimenssion based  on what was selected from the first one.

                      =if(WildMatch(GetFieldSelections(CONVENIO),'*'& CONVENIO2 &'*'),CONVENIO2,NULL())

                      And that did it.


                      But when nothing is selected, nothing apears....

                      So created 2 iqual charts where on LAYOUT >>show>> condition...


                      One has a count(getfieldselections(Convenio)) =0 and no calculated dimension.

                      and the other has a

                      count(getfieldselections(Convenio)) >=1 and the calculated dimension.


                      And works perfect.



                      Thank you so much.