Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Coding

$
0
0

I can't seem to get an expression to divide correctly.

My code is:

=(Sum(IIF(Asc(Fields!SOP_Type.Value) = 82,(-Fields!Unit_Price.Value),(Fields!Unit_Price.Value)))) / (Count(Fields!SOP_Type.Value))-((Count(IIF(Asc(Fields!SOP_Type.Value) = 82,(Fields!SOP_Type.Value),Nothing)))*2)

Basically the first part gives me a number, and in a box by itself works correctly, giving me the number 270.7. The second part correctly gives me another number, 54, and it works by itself in a box as well. I have gone through and made sure that both these number are correct. The problem i'm having is that when I put both of these expressions into a single text box and divide them I get the wrong quotient.

Any help is appreciated, thank you.


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>