Formula not stored as number
Hi all,
For some reason Ninox doesn't store the value of one of my formulas as a number, creating all sorts of issues when trying to display the values in a table view.
The single parts of the formula are 'Project / Proposal'.'Total Activity-Related Budget'
(a formula storing a number);
A variable "e" calculating the percentage of days a project ran over a certain years, compared to its total duration:
let a := date(2021, 1, 1);
let b := date(2021, 12, 31);
if 'Project / Proposal'.'Start date' = null or 'Project / Proposal'.'End date' = null or 'Project / Proposal'.'Start date' > b or 'Project / Proposal'.'End date' < a then
0
else
let c := max('Project / Proposal'.'Start date', a);
let d := min('Project / Proposal'.'End date', b);
let e := days(c, d) + 1 / days('Project / Proposal'.'Start date', 'Project / Proposal'.'End date') + 1;
And an exchange rate, also a number, taken from a connected subtable: 'Exchange rates'.'EUR->CHF - 2018 Average exchange rate'
The final result is: e * ('Project / Proposal'.'Total Activity-Related Budget' * 'Exchange rates'.'EUR->CHF - 2018 Average exchange rate')
And yet the value displayed is not considered a number by Ninox. I ran multiple tests and the single components of the formula are all stored as numbers. Any idea of what I'm doing wrong here?
In the table view, I can work around this by using the function number(field)
, but then the figure showing is not formatted properly and shows multiple decimals - I need to have two decimals only.
Thanks in advance for your help.
Many thanks,
Giovanni
Reply
Content aside
- 3 yrs agoLast active
- 278Views