system
September 22, 2009, 3:13pm
#1
Hey, so i have a variable that goes something like this:
=If([Var]<=0;“0”;(If([Var] =1;“1”;(If([Var]=2;“2”)
This works great but when a [Var] doesn’t equal a number it doesn’t show up in the results so in the end i only see numbers where there is data. This is quite unprofesional. Any help would be great. thanks.
showt2 (BOB member since 2009-05-11)
system
September 22, 2009, 3:19pm
#2
Hi,
Have you tried modifying the formula this way?
=If([Var]<=0;"0";(If([Var] =1;"1";(If([Var]=2;"2";"something else")
Marek Chladny (BOB member since 2003-11-27)
system
September 22, 2009, 3:52pm
#3
thanks for the reply. but basically my variable reaches all the way to 10 i limited it earlier to only show 2. but say if there is values for 0 and 2 it will now show 1 at all and only show:
0
2
I need it to show all numbers:
0
1
2
Please help.
showt2 (BOB member since 2009-05-11)
system
September 22, 2009, 4:04pm
#4
What do you want it to display if the value is not 0-10?
Joe
joepeters (BOB member since 2002-08-29)
system
September 22, 2009, 4:06pm
#5
it should just say ‘>10’
showt2 (BOB member since 2009-05-11)
system
September 22, 2009, 4:10pm
#6
Have a look at this Reporter’s FAQ:
How can I include data for all months in a crosstab, even if a particular month has no data?
One way to do this is to create a second data provider using only the months. Then link (or “merge”) the second data provider (query) with the first data provider. Use the month column from the second data provider in the cross tab. This should bring in all months even if there were no data for that month. However this technique does not work if you have sections in your report.
Dave Rathb…
Marek Chladny (BOB member since 2003-11-27)
system
September 22, 2009, 10:41pm
#7
If i understnad you correctly, you may want to click on the block and go to “Properties” tab and check “Show rows with empty dimension values”.
Abishek (BOB member since 2004-12-09)
system
September 22, 2009, 11:17pm
#8
hey Abishek, i’ve tried that as well, but it doesn’t show still.
showt2 (BOB member since 2009-05-11)
system
September 22, 2009, 11:19pm
#9
is your variable measure or dim? if measure did you try checking “Show rows with empty measure values”.
Abishek (BOB member since 2004-12-09)
system
September 23, 2009, 12:41pm
#10
Then a slight variation of Marek’s code should work:
=If ([Var] Between (0;10);FormatNumber([Var];"0");">10")
Joe
joepeters (BOB member since 2002-08-29)