Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#Computation Error Work Around

Status
Not open for further replies.

khansen97

Programmer
Oct 14, 2003
60
US
I was getting a #Computation Error while trying to create a variable with a if statment in it. I know the reason for the error (One of the varialbes in the if statement is missing from the data set results). I know that one of the solutions is to put the missing object into the report and hide the column. My problem with this solution is that it quadrouples my data.

The second solution is to change my variable from a measure to a dimension. This worked. It returned the correct data. However, It repeats each column.

So before I had this:

01 02
Variable A 2 4
IfVariable #Computation #Computation

With changing it to a dimension I have this:

01 01 02 02
Variable A 1 1 2 2
IfVariable 0 1 0 2

This is what I am trying to make it do:

01 02
Variable A 2 4
IfVariable 1 2

Any Suggestions?
 
I figured out the answer to my own question.

You would create a variable for each part of the If statement and then sum the variables to get the expected result
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top