OK...so there seems to be another problem now.
I have used the following code:
IF ({rmadtl.ShortChar01}) = ""
OR
(ISNULL ({rmadtl.Shortchar01}))
THEN
TRUE
for the Serial Number which is from the rmadtl table and is ShortChar01 field. This works and hides any serial numbers that are empty strings.
BUT...
IF ({rmadtl.ShortChar03}) = ""
OR
(ISNULL ({rmadtl.Shortchar03}))
THEN
TRUE
does NOT hide the Dates. It still shows "Date:" and also "0"
I am not sure why this is happening for the date field but not the serial number field. Does anybody else know why this is happening?
Related
I have the formula
=IF(AND(HOUR(D2)<=8,HOUR(D2)>=19), "OPEN", "OOH")
This should return the required text values "OPEN" or "OOH" depending if the hour falls within the noted range.
When trying in cell E2 of this sheet https://docs.google.com/spreadsheets/d/1xNFVHLnQGkRgZdLmejCyU0BByOPBY8NMoIYj6SkTFGY/edit#gid=431567503 it returns a text value but not always the correct one. What could be missing from this formula?
I have also tried swapping the range around without success
=IF(AND(HOUR(D2)>=19),HOUR(D2)<=8, "OPEN", "OOH")
Update: also tried with OR instead of AND but it does no better
=IF(OR(HOUR(C3) >=19, HOUR(C3) <=8), "OPEN", "OOH")
if from 8 to 19 = OPEN then use this in E2:
=INDEX(IF((HOUR(C2:C)>=8)*(HOUR(C2:C)<19), "OPEN", "OOH"))
Your conditions are a bit wrong. The IF form is:
=IF(condition, value_if_true, value_if_false)
In your question, you say hour >=19 OR hour <= 8, so you should be using OR, as you do in your update. However, you switched the true and false values in your updated statement. Try:
=IF(OR(HOUR(C3) >=19, HOUR(C3) <=8), "OOH", "OPEN")
With 8:01, this returns "OOH"
With 9:01, this returns "OPEN"
With 18:01, this returns "OPEN"
With 19:01, this returns "OOH"
Logic error. The thing can't be <=8 and >=19 at the same time.
If you reverse the signs to >8 and <19, you might get closer to what you want.
I use this code to show the sum of my bank
if {?Bank} = {Bank.sum} then {#1} else 0
I have 6 bank accounts and when the bank = Bank has operations, then I show the sumand else I do not show anything.
I do not want to show "0" in my report.
I want to show " "(space), but when I change it to " ".
When I do it, I get the error
A number is required here
How can I fix it?
In that case, use:
if {?Bank} = {Bank.sum} then ToText({#1},0) else ""
The 2nd arg indicates zero decimal points. See online documentation of the ToText() function.
One option:
if {?Bank} = {Bank.sum} then ToText({#1}) else ""
Another option is to use formatting.
I'm trying to sum only the visible rows for a report and I know the format is:
=Sum( iif( <use the condition of the Visibility.Hidden expression>, 0, Fields!A.Value))
In my report, I've set row visbility to:
=IIF(CInt(Fields!EM_ET.Value)=1 Or CInt(Fields!EM_ET.Value)= 2,True,False)
Not exactly sure what I'm missing, but when I use this as an expression:
=Sum(IIF(CInt(Fields!EM_ET.Value)=1 Or CInt(Fields!EM_ET.Value)= 2,True,False),0,Fields!EM_ET.Value)
I get this following error: Value expression for textrun'FTD1.Paragraph[0].TextRuns[0]' has a scope argument that is not valid for aggregate function.
You are giving the True/False as output to the SUM() from your expression.You need to change your expression as,
=Sum(IIF(CInt(Fields!EM_ET.Value) = 1 Or CInt(Fields!EM_ET.Value)= 2,0,Fields!EM_ET.Value))
Thanks coder of code.
I am getting some error message if i am using '0', so i replaced with nothing it's working. I thought it would be helpful.
=SUM(IIF(ISNOTHING(Fields!value1.Value) OR ISNOTHING(Fields!value2.Value),NOTHING,Fields!value1.Value))
I was having similar issues. I know this question has a marked answer, however it isn't entirely correct.
The following contains the code from the "marked correct" answer:
=Sum(IIF(CInt(Fields!EM_ET.Value) = 1 Or CInt(Fields!EM_ET.Value) = 2,0,Fields!EM_ET.Value))
The following snipit of code contains the code from above, with a slight tweak:
=Sum(IIF(CInt(Fields!EM_ET.Value) = 1 Or CInt(Fields!EM_ET.Value) = 2,NOTHING,Fields!EM_ET.Value))
By changing the "0" to "NOTHING" this will resolve any lingering issues with your formula. The formula I was having issues with was returning "#Error" in the cell that was supposed to return the sum of the visible cells in the column within the row group.
My formula originally looked like this:
=IIF(Sum(Fields!VCBitType.Value) <> 0 OR (Parameters!Details.Value = "Detail"), Sum(IIF((Fields!VCBitType.Value = 0) and (Parameters!Details.Value = "Dangerous"),0,Fields!VC.Value)), "")
I altered my formula after seeing Hari's comment above:
=IIF(SUM(Fields!VCBitType.Value) <> 0 OR (Parameters!Details.Value = "Detail"), SUM(IIF((Fields!VCBitType.Value = 0) and (Parameters!Details.Value = "Dangerous"),NOTHING, Fields!VC.Value)), "")
I wanted to set the cells value to "" (empty) rather than hide the cell entirely or set that cell's value to "0" in my report (due to the fact that not displaying the cell entirely made the report look really funky). Because I did this, using a "0" in my formula conflicted with the value of the cell which was "" (empty), causing the formula to break. The only change I made was to alter "0" to "Nothing", this resolved the issue I was having with the cell's formula.
I am trying to write a report that is looking for someone that HAS NOT had a certain immunization. The problem is what ever I try for a formula it is saying they have had it or have not had the immunization. When I go to validate it is not always correct
if ({table.column} in (ID#) to (ID#)) then
"Has had Immunization"
else if ({table.column} <> (ID#) to (ID#))
then "Has not had Immunization"
ID# was the same number for all.
Record-selection formula:
// list desired immunization values; remove quotes if IDs are numeric
{table.field} IN [
'ID0',
'ID1',
...
'IDn'
]
I have a schema of Row Keys 1-n. In each row there are a variable number of supercolumns with a TimeUUID 'name'. Im hoping to be able to query this data by a time range.
Two issues have come up:
in KeyRange -> the values that I put in for 'start_key' and 'end_key' are getting misunderstood (for lack of a better term) by Thrift. Experimenting with different groups of values Im not seeing what I expect and often get back something completely unexpected.
Example: my row keys are running from 1-1000 with lots of random gaps. I put start_key = 50 and end_key = 20 .. and I get back rows with keys ranging from 99 to 414.
Example: I have a known row with key = 13. Putting this value into start_key and end_key gives me no results.
Second issue: even when I do get results the 'columns' portion of the 'keyslice' is always empty. I have checked via cassandra-cli and I know there is data.
Im using Perl as follows:
my $slice_range = new Cassandra::SliceRange();
$slice_range->{ start } = create_UUID( UUID::Tiny::UUID_TIME, "2010-12-24 00:00:00" );
$slice_range->{ finish } = create_UUID( UUID::Tiny::UUID_TIME, "2011-12-25 00:00:00" );
my $slice_predicate = new Cassandra::SlicePredicate();
$slice_predicate->{ slice_range } = $slice_range;
my $key_range = new Cassandra::KeyRange();
$key_range->{ start_key } = 13;
$key_range->{ end_key } = 13;
my $result = $client->get_range_slices( $column_parent, $slice_predicate, $key_range, $consistency_level );
print Dumper( $result );
Clearly Im misunderstanding some basic precept.
EDIT: It turns out that the Perl library Im using is not properly documented. The UUID creation was not working as advertised. I opened it up, fixed it, and now its all going a bit more as I was expecting. I can slice my supercolumns by date/time range. Still working on getting the key range portion to work.
http://wiki.apache.org/cassandra/FAQ#range_rp covers why you're not seeing what you expect with key ranges.
You need to specify a SlicePredicate that contains the actual range of what you're trying to select. The default of no column_names and no slice_range will result in the empty columns list that you see.