13 Replies Latest reply: Feb 2, 2017 4:03 AM by Patrick routier RSS

    Variable to update

    Patrick routier

      hello,

       

      I'm wondering If it's possible to set a variable with the expression result.

      I tried directly with the set function without success :-(

       

      thank you in advance

      patrick

        • Re: Variable to update
          Krishnapriya Arumugam

          Yes it is possible.

           

          If you want to store the expression result you need to use LET statement and SET to evaluate while the variable is used.

           

          So in your case try with LET statement.

            • Re: Variable to update
              Patrick routier

              hello,

              thank you for your answer, but I didn't found the way to integrate the Set function in my expression...

              below my expression:

              =round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
              round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number])) ...

               

              knowing that this expression has in dimension a periode (3 last days).

               

              best regrads,

              Patrick

                • Re: Variable to update
                  Krishnapriya Arumugam

                  Try to change the expression as below. You need use the variable name with "="

                   

                  =round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={"=$(choice2)"}>} [Lot number]))/
                  round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={"=$(choice2)"}>} [Lot number])) ...

                  • Re: Variable to update
                    Vishwarath Nagaraju

                    May be this? And can you tell us how you defined your variable choice2 ?

                     

                    =round(count({< Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={'$(choice2)'}>} [Lot number]))/

                    round(count({<  Availability={'WIP'},[Product Type Code]={'DI'}, Division={'$(choice2)'}>} [Lot number]))

                      • Re: Variable to update
                        Patrick routier

                        Hello,

                        sorry but we are on the wrong way... I was not clear enough before.

                        My main problem in not to stock the expression itself or their result in stand alone (without dimension) mode because the expression alone don't take the dimension limit into account.

                        This is why I would like to record the result on a variable in the same time of the execution on this one.

                        my dimension is :

                        =if(Ceil(CutOffDate-[Last Op Move In])<=3,1)

                        and my Expression is:

                        =round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
                        round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number]))

                         

                        hopping that it's more clear for you and AGAIN, thank you in advance

                        Patrick

                          • Re: Variable to update
                            Vishwarath Nagaraju

                            I am sorry  i quite did not get that. Is it possible to send us a screenshot of your issue and the ouput you are looking for?

                              • Re: Variable to update
                                Patrick routier

                                Capture.JPG

                                here this is my outcome.

                                the indicator equal to 39% for 'SMD' division and for the the dimension concerned.

                                what I would like to do is to put the 39% value in the title of the graph.

                                another question, I didn't find the trick to show the value on the Needle.

                                 

                                thank you for your support.

                                Patrick

                                  • Re: Variable to update
                                    Vishwarath Nagaraju

                                    Use the same expression as you have in Presentation tab -> Text in Chart? Did you use that? Can you share your expression you are using in Text in chart window?

                                      • Re: Variable to update
                                        Patrick routier

                                        hello,

                                        my Text is not in the text chart but in the 'title in the chart, in general menu'.

                                        =choice2 &' % lot in hold <= 3 days'

                                         

                                        and before the sympbol '%' I would like to put the result of my expression which is equal to 39% in this case.

                                        my expression is :

                                        =round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
                                        round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number]))

                                        and my dimension :

                                        =if(Ceil(CutOffDate-[Last Op Move In])<=3,1).

                                         

                                        if I put my expression as it is, it's working but the number is wrong because it doesn't take my dimension into account.

                                         

                                        hopping that you understand my problem.

                                        Regards,

                                        Patrick

                                         

                                         

                          • Re: Variable to update
                            Patrick routier

                            hello,

                            my Text is not in the text chart but in the 'title in the chart, in general menu'.

                            =choice2 &' % lot in hold <= 3 days'

                             

                            and before the sympbol '%' I would like to put the result of my expression which is equal to 39% in this case.

                            my expression is :

                            =round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
                            round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number]))

                            and my dimension :

                            =if(Ceil(CutOffDate-[Last Op Move In])<=3,1).

                             

                            if I put my expression as it is, it's working but the number is wrong because it doesn't take my dimension into account.

                             

                            hopping that you understand my problem.

                            Regards,

                            Patrick

                            • Re: Variable to update
                              Patrick routier

                              hello,

                               

                              the variable "choice2" works properly. what I would like to stock on another variable is the result of my expression taking into account my dimension.

                              do you have any idea of how I can do that ?