Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Field data as 1 if it is 0
Sneha
Dear All,
I have one field " age " as
age = BirtDateTime.diffDay(dataSetRow["TARGSTARTDATE"],dataSetRow
["TARGCOMPDATE"])
but i want to show this age field as 1 if this field is 0
how can i do this..
Thanks
Find more posts tagged with
Comments
JustME
Hey,<br />
<br />
I guess you are talking about a computed column to calculate the new age for you. I threw together a real quick example for you. Look at the expression for the computed column in the data set. <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
d=BirtDateTime.diffYear(row["ORDERDATE"],BirtDateTime.now());
if (d<1) d=1;
d;
</pre>
Sneha
Thanks a lot and appreciating for ur prompt reply with attached example.and i will check it and inform you
mwilliams
Another possibility would be to use the mapping feature in the property editor to show values of 0 as 1 in your table.