expression dividing two numbers but check for number first
In my report viewer i have to find a total percentage based on two different columns. I have that working fine except that some of my columns don't have a number and when it tries to divide i get "NaN" in the display text box.
here is the expression i used to find the total:
Fields!PartiesVisited.Value / Fields!TotalVisits.Value
is there an if statement i could wrap them with to 开发者_StackOverflow中文版check if the box even has a value in it or not before dividing?
thanks
In the column where the NaN is showing i used the replace function to place a 0 instead and it worked well:
=Replace(Fields!NumberTotals.Value,"NaN","0")
精彩评论