8 Replies Latest reply: Apr 30, 2012 2:02 PM by Baru - RSS

    Back ground colour in expresion

      Hi,

       

      I am having some problem in back ground colour in expresion.i given some calculations in expresion-background tab.

      when i am selecting fields(list box),it is showing correct background colours based on my expresion.

      when i am de-selecting the fields it is showing wrong colours.

      can anyone help me..why it is happening.

       

       

      regards,

      baru

        • Back ground colour in expresion
          Oleg Troyansky

          baru,

           

          you need to post either a sample app, or at least the expression itself, to let us troubleshoot your problem.

           

          It sounds like your expressions might be referring to specific field values, and when you de-selecting the fields, the value stops being unique and the expression stops working. I'd need to see the expression to tell for sure.

           

          cheers,

           

          Oleg

            • Back ground colour in expresion

              Hello Oleg,

               

              Thanks for your Reply,

              You are Correct i used field name in expression,this is my expression--

              count({$<YEAR = {$(=max(YEAR))}, MONTH = {"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/

              aggr(nodistinct count({$<YEAR = {$(=max(YEAR))}, MONTH = {"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)),ASMNAME)

               

              it is showing corect values.

              I have given a condition in expression-back ground colour tab.when ia clicking in ASMNAME,it is showing perfect colour, when i am disable the ASMNAME it is showing error colour.

              Can u help me.

               

              regards,

              baru

                • Back ground colour in expresion
                  Oleg Troyansky

                  your function AGGR in the denominator is producing an array of values, associated with the field ASMNAME. When more than one ASMNAME is available, the aggr returns multiple values and the whole expression doesn't work.

                   

                  You need to enclose the function AGGR in another aggregation function, such as sum() or avg(), depending on your needs.

                   

                  This expression looks awfully complex for a background color. Can you explain what are you trying to accomplish?

                   

                  cheers,

                   

                  Oleg

              • Back ground colour in expresion

                Hi,

                 

                     Have u specified any conditions in the expression of background tab?

                 

                     That may be the cause of this issue.

                 

                     The simple idea is that the given condition is satisfied only when making some selections in the list boxes.

                 

                     Remove the condition if possible or you can also try to give the correct condtion if needed.

                 

                Regards

                Andrew Hudson

                • Back ground colour in expresion
                  Arun Prasadh Narasimhalu

                  Hi

                  I think the problem is with the condition. if u don't need to enable the colur with respect to condition then jst disable the condition and right click the field and select custom format cell and add the colour what u want. but this one won't work for conditions. if u need condition based colour then use proper condition.

                  • Back ground colour in expresion

                    Hi,

                     

                    Thanks for your Reply,

                     

                    I am keeping Expression and background expresion here pls help me

                     

                    i taken back ground coloue expresion is------

                    =if(count({$<YEAR = {$(=max(YEAR))}, MONTH = {"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))
                    /count({$<YEAR = {$(=max(YEAR))}, MONTH ={"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))
                    >=
                    (((((count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) = 1, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -1)))},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/
                    count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) = 1, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -1)))},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)))
                    +(count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 2, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -2)))},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/
                    count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 2, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -2)))},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)))
                    +
                    (count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 3, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear,-3)))},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/
                    count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 3, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear,-3)))},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)))
                    )/3)*'110')/'100'),RGB (0,255,0),

                    if(count({$<YEAR = {$(=max(YEAR))}, MONTH = {"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))
                    /count({$<YEAR = {$(=max(YEAR))}, MONTH ={"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))
                    <=
                    (((((count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) = 1, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -1)))},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/
                    count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) = 1, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -1)))},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)))
                    +(count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 2, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -2)))},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/
                    count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 2, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear, -2)))},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)))
                    +
                    (count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 3, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear,-3)))},ClosingStock={'>0'}>} DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/
                    count({$<YEAR = {$(=only(YEAR) - $(=if(only(MONTH) <= 3, 1, 0)))}, MONTH = {$(=month(addmonths(MonthYear,-3)))},ClosingStock={'>0'}>} total DISTINCT IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)))

                    )/3)*'90')/'100'), RGB (255,0,0),RGB (0,255,255)))

                     

                    i taken expresion is

                     

                    count({$<YEAR = {$(=max(YEAR))}, MONTH = {"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code))/

                    aggr(nodistinct count({$<YEAR = {$(=max(YEAR))}, MONTH = {"<=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))>$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"},ClosingStock={'>0'}>} IF(AHC_CallDate = MX_DATE, AHCHdr_Outlet_Code)),ASMNAME)

                     

                    if u have any confusion pls let me know,i will explain.

                    regards,

                    baru

                    • Back ground colour in expresion

                      Hi,

                       

                      Can any one help me in this issue.

                       

                       

                      regards

                      baru