6 Replies Latest reply: Jan 27, 2016 11:48 AM by M MinMin RSS

    $1 in Variable and this Variable in Set Analysis.

      Hi everyone,

      I have a variable, that sets  the  Number Format, like this

       

      IF(NumFormatName='Decimal' , Num($1, '#.##0,' )

      ,

        IF(NumFormatName='Thousand.', Num($1 / 1000 , '#.##0,'  & ' Tsd.' )

      ,

          IF(NumFormatName='Million.', Num($1 / 1000000,'#.##0,'  &' Mio.')

          ,

            If(NumFormatName='Billion.', Num($1 / 1000000000,'#.##0,' &' Bio.')

      ))))

       

      In my table , I have a Expression, which is defined with Set Analysis.

      $(vNumFormVar(Sum(Kilometer))) this is no problem. But when I write the expression with Set Analyse, Condition in Set Analysis will be ignored.

      This means, this expresseion

      = $(vNumFormVar($(=Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer))))

      hat same Result as

      = $(vNumFormVar(Sum(Kilometer)))

      By the way, Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer) is unproblematic.

       

      Thanks!

        • Re: $1 in Variable and this Variable in Set Analysis.
          Stefan Wühl

          If you are using

          = $(vNumFormVar($(=Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer))))



          the

          $(=Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer))

          part will be evaluated once per chart, not per dimension value of your chart.

          Would this explain what you are seeing?

            • Re: $1 in Variable and this Variable in Set Analysis.

              I don't understand, what you mean "the part will be evaluated once by chart, not per dimension value of you chart." .

               

              What I saw, = $(vNumFormVar(=Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer))))

              hat same result with = $(vNumFormVar(Sum(Kilometer))).

               

              Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer) shows the result in pair. This means, when the StartName is same as EndName, Endname is same as StartName, then shows the results. For example,

              From A to B needs 100000 Kilometter, From B to A need 120000 Kilometer. When we only choose A-B ,the Result is:

              A - B 100000

              B - A 120000.

              In pair .

               

              At the same time,  Sum(Kilometer) shows the result, only

              A- B 100000.

               

              $(VNumFormVar) define the Numberofrmat.

              100000.00

              100,000.00

              100 Tsd.

            • Re: $1 in Variable and this Variable in Set Analysis.

              Hi everyone,

              I have a variable, that sets  the  Number Format, like this

               

              IF(NumFormatName='Decimal' , Num($1, '#.##0,' )

              ,

                IF(NumFormatName='Thousand.', Num($1 / 1000 , '#.##0,'  & ' Tsd.' )

              ,

                  IF(NumFormatName='Million.', Num($1 / 1000000,'#.##0,'  &' Mio.')

                  ,

                    If(NumFormatName='Billion.', Num($1 / 1000000000,'#.##0,' &' Bio.')

              ))))

               

              In my table , I have a Expression, which is defined with Set Analysis.

              $(vNumFormVar(Sum(Kilometer))) this is no problem. But when I write the expression with Set Analyse, Condition in Set Analysis will be ignored.

              This means, this expresseion

              = $(vNumFormVar($(=Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer))))

              hat same Result as

              = $(vNumFormVar(Sum(Kilometer)))

              By the way, Sum({$+<[StartName]=[EndName],[EndName]=[StartName]>} Kilometer) is unproblematic.

               

              Thanks!