Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Substracting Two Measures

Hi,

 

I have two, relatively simple sum measures that produce two sets of counts.

Measure1

100

250

10

 

Measure2

1500

1000

50

 

Then I have a simple subtraction measure, Measure2-Measure1. This produces some correct results, however sometimes it produces very incorrect results. For instance, given the above it may produce

(1,500 - 100) = 1400

(1,000 - 250) = 800 ???

(50 - 10) = 40

 

It should be very simple, but it's not producing the right result. I've tried setting Measure1 and Measure2 equal to a var name, then subtracting those, same issue. I've also tried just shortening the equation to the measure by itself to confirm that it's producing the right counts going into the measure (so 1,000 and 250) and that is fine as well. It just doesn't subtract them correctly about 1/5 of the time. 

 

Any ideas?

4 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous,

     

    Can you share a sample file, please? You post the result here. I'm afraid we can't find out the reason. 

    If these measures are evaluated in the same context, it should be correct. But we don't know if there is any context conversion in the measures. 

     

     

    Best Regards,
    Dale

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your reply Dale. Unfortunately, the data is sensitive. I recreated the pertinent portions but the error was not reproduced in those portions, leading me to believe the error exists somewhere within the pre-built model I'm pulling from.

       

       

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi Anonymous,

         

        Did you solve the issue? If you can't share the data, you can share some snapshots and the formulas at least.

         

         

        Best Regards,
        Dale