5 Replies Latest reply on Feb 18, 2016 11:44 PM by Jonathan Velarde

    urgent calculation

    g Vish

      Hi ,

      I have two columns score% and median %


      I need to find the difference between score% and median % in terms of percentage




      1 . name1             100%     77%

      2. name2                92%      77%



      However if i try score% - median % it says cannot do calculation due to aggreate and non aggregate measures . Please help

        • 1. Re: urgent calculation

          g Vish,

          Do you have a sample packaged workbook so we can see the data itself and help you resolve this?  Is one of those columns a calculated field and the other isn't?



          • 2. Re: urgent calculation
            g Vish

            Hi ann , unfortunately cant post the workbook. One of them is score% Which is a calculated field using c= sum(a)/Sum(b)


            the other one has calculated field formulae exclude(xyz):c

            • 3. Re: urgent calculation

              I'm not quite clear on your formulas, can you help me clarify them to make sure I understand them properly.


              Score is calculated as  sum([value a])/sum([value b]), correct?  I assume that you're using c as the name of the formula, so I'm going to call it [score] here for clarity.


              The second calculation... is that an LOD?  Is it formatted like this:  {Exclude [Value x] : [score]}  Or do you have 3 values in that formula, in which case it would be {Exclude [Value x],[Value y],[Value z] : [score]}


              You could use the Superstore dataset to try and mock up what you're trying to do, also.



              • 4. Re: urgent calculation
                g Vish

                sorry for not making it clear. since i have defined it as attribute it is nt working.I had to change it to aggregate measure and then perform subtraction. I really appreciate your time and effort.

                • 5. Re: urgent calculation
                  Jonathan Velarde

                  Good Day!


                  Hi.., just to share my experience about this. Problem in Calculation between two aggregated fields is still possible.

                  You need to do is to determine the field is not the same with the other one before you do the difference calculation.



                  A%-B%  it says cannot do calculation due to aggreate and non aggregate. meaning 1 of the calculated field here is a non-aggregate. You just need to aggregate the other field to be able to accept this calculation.


                  Hopefully this could help.


                  Jonathan B. Velarde