7 Replies Latest reply: May 20, 2016 2:11 AM by scotly victor RSS

    % in expression

    scotly victor

      Hi Everyone,

       

      I have set up  toggle for refund value and refund percentage for KPI Object .

       

      If I select refund value the  KPI should show value and

       

      If I select refund percentage the KPI should show % .


      I have set up number formatting as auto .

       

      I had used num(,'##.##%'

      ).

      It doesn't work

       

      Any help please?


        • Re: % in expression
          Sunny Talwar

          May be try like this:

           

          If(showvalie, Num(Sum({<Flag = P{Refund}>} Sales), '#,##0.00', Num(Sum({<Flag = P{Refund}>} Sales)/Sum/(Sales), '#,##0.00%')

           

          I made up the expression, replace the above with your actual expressions

            • Re: % in expression
              scotly victor

              This is my expression

              It did not work

               

              if(%Perval='value',

              num(((SUM({<type={'order'},$(vPeriod)>} [selling fees])+

              SUM({<type={'order'},$(vPeriod)>}[fba fees] )+

              SUM({<type={'order'},$(vPeriod)>} [other transaction fees] )

              + SUM({<type={'order'},$(vPeriod)>}other))*-1)/100000,'#0.00')

              ,

               

               

              num((((SUM({<type={'order'},$(vPeriod)>} [selling fees])+SUM({<type={'order'},$(vPeriod)>}[fba fees] )+SUM({<type={'order'},$(vPeriod)>} [other transaction fees] )

              + SUM({<type={'order'},$(vPeriod)>}other))*-1)/sum({<type={'order'},$(vPeriod)>}[Net Sales])),'#0.00%')

               

               

              )

                • Re: % in expression
                  Sunny Talwar

                  May be because of missing parenthesis at the very end?

                   

                  If(%Perval = 'value',

                  Num(

                  (

                  (Sum({<type={'order'},$(vPeriod)>} [selling fees]) +

                  Sum({<type={'order'},$(vPeriod)>} [fba fees])+

                  Sum({<type={'order'},$(vPeriod)>} [other transaction fees])+

                  Sum({<type={'order'},$(vPeriod)>} other))*-1)/100000,'#0.00')

                  ,

                  Num((((SUM({<type={'order'},$(vPeriod)>} [selling fees])+SUM({<type={'order'},$(vPeriod)>}[fba fees] )+SUM({<type={'order'},$(vPeriod)>} [other transaction fees] )

                  + SUM({<type={'order'},$(vPeriod)>}other))*-1)/sum({<type={'order'},$(vPeriod)>}[Net Sales])),'#0.00%'))

                   

                   

                  )

                  • Re: % in expression
                    Celambarasan Adhimulam

                    not worked - Are you getting null value?

                    Are you getting value for refund expression?

                    Check the value returned by below expression is correct

                    sum({<type={'order'},$(vPeriod)>}[Net Sales])

                • Re: % in expression
                  Celambarasan Adhimulam

                  What do you meant by Refund Percentage here?

                  Percentage of the amount refunded to the concern Org/Person from the Bill/Invoice amount?

                  if so you could have to try

                  Num(Refund Value/Invoice Amount,'##.##%')

                   

                  % in number format, will just multiply the value with 100 and adds '%' symbol at the end