I have reports that some fields are empty. When the rows contain no blank or empty fields the sum totals work perfectly.
My question: Is there a way to ignore those empty fields and still achieve the sum total of the column? Any suggestions or comments are well appreciated.
Yes, I’ve done that and there are no errors showing; with the exception of the typical ‘Not Found’ .map errors.
When I run a query that returns rows that contain data in each column the sum works perfectly. It’s only when the columns are empty from the Left Join tables. That’s why I suspect the empty columns are preventing the sum from calculating and returning the Invalid Amount or NaN.
The only exception is the ‘NaN’ that is returned on this column:
<td>{{sc_dor_test.data.list_report_test_new.sum(`auto_miles.default(0).formatNumber(1, ".", ",")`)}}</td><!-- auto_miles -->
I think it is the misplacement of the `) after the formatNumber...
The error was that I had placed the closing quote & parenthesis `) on the outside of the .formatNumber(1, “.”, “,”).
After I moved the `) to this:
<td>{{sc_dor_test.data.list_report_test_new.sum(`auto_miles.default(0)`).formatNumber(1, ".", ",")}}</td><!-- auto_miles -->
It now works!
Thanks Teodor and the others for your direction and guidance!