3 Replies Latest reply: Apr 2, 2015 9:33 AM by Janneke Inia RSS

    Problem to transform an expression into a dimension

      Hello Experts QV,

       

      How we could transform an expression into a dimension in order to use it in orhers expressions ?

      Specially,  I want to transform this expression if (count(Period_MonthName)>1, MinString(Period_MonthName),Period_MonthName) 

       

      Thanks a lof for your help.

        • Re: Problem to transform an expression into a dimension
          Alessandro Saccone

          You enter in a logical loop because expressions are computed on dimension so your expression

           

          if (count(Period_MonthName)>1, MinString(Period_MonthName),Period_MonthName) 

           

          count and extract min values for which dimension?

           

          You can use expressions in dimension but not with aggregate functions ... try to use variables!!!

            • Re: Problem to transform an expression into a dimension

              Thank you for your feedback.

               

              My dimension is  Period_MonthName ( it's equal to MonthName(Date)).

               

              I have exactly this problem

               

              In a pivot table I have for example

              MyMonth => if (count(Period_MonthName)>1, MinString(Period_MonthName),Period_MonthName)   

               

              MyMonth          Applications

               

              July-2011           A01

              Feb-2013           A15

              July-2011           A02

              Feb-2013           A05

              March-2013        A02

               

              I want to add a count(Applications) by MyMonth (that is an expression in my case, this is my problem).

               

              The resulat that I want

              MyMonth          Count(Applications)

               

              July-2011           2    

              Feb-2013           2

              March-2013       1

               

               

              Do you have an idea?

               

              PS/ I just start to working with QlikView ..