Skip to main content
OneStream Employee
Feb 8, 2022 9:45 AM UTC
Solved

DynCalc displaying zeros

Hi all,

I have a dynamic calc that displays zeros instead of null when the source cell is null.

In the image below, MTD_CF is dynamic and it shall display None data under certain conditions. When None is null, MTD_CF is showing 0. Is there a way to avoid this so the dynamic calc shows nulls as well?

gsfeliu_0-1644313136601.png

I've tried with RemoveZeros, like this:

Return api.Data.GetDataCell("RemoveZeros(V#" & view & ":U1#None)").CellAmount

The code returns the result, but does not remove the zeros.

Any ideas?

Thanks in advance.

GSF

Employee - Mentor
Feb 8, 2022 4:03 PM UTC

Try taking off ".CellAmount". That should have it return NULL.

2 replies

Employee - Mentor
Feb 8, 2022 4:03 PM UTC

Try taking off ".CellAmount". That should have it return NULL.

gsfeliuOneStream EmployeeAuthor
OneStream Employee
Feb 9, 2022 8:36 AM UTC

Thanks Eric.

That worked. In an earlier version of my script I had to add ".CellAmount" for it to display any data at all. I did not think about removing it from the final version.

Regards,

GSF