So I have a crosstab that is using dbr.calc command to calculate the %. My issue is that whenever there is a row with null data then dbr.calc returns with 0.00% how do I go about keeping this row blank instead of showing the 0%?
Removing Zeroes From dbr.calc
(4 posts) (3 voices)-
-
Can you open a support ticket with export as SQL output attached so we can replicate your report behavior?
--
myDBR Team -
Hi.
I Have the same problem, because my information have a 0 in some cases.really no have a problem, is simple in math if you try divide by 0 the result is 0, my problem is the next.
When have a 0 in some cases, i try to evaluate second value with 100% but the field is null don't use a CASE to evaluate because donn't have a field, the field is virtual
Example
Report | value1 | value2 | %percent |
some | 0 | 3 | null | <-- 0/3*100 = null/error/0
how to evaluate %percent null to change 100%
Report | value1 | value2 | %percent |
some | 0 | 3 | 300% | <-- 3*100 = 300%
file
Report SQL Export -
If the dbr.calc produces 0.00% with null data, make sure that you are using latest version (run the automatic updater). If the problem persists, please contact support with SQL export of your report.
don't use a CASE to evaluate because donn't have a field, the field is virtual
What do you mean by a virtual field?
some | 0 | 3 | 300% | <-- 3*100 = 300%
What is the logic of getting 300% out of 0 and 3?
dbr.calc
accepts any php expression as parameter so you can handle nulls/zeros differently if you want.--
myDBR Team
Reply
You must log in to post.