Perform SUM Calculation within PDF Report

Hi All, I have created a PDF report which details vehicle movements. The PDF Report works well but I would like to look at performing SUM calculations within the report to improve MI but can't quite work out how.

<<COUNT(FILTER(โ€œVehicle Movementsโ€, AND ([Searched]=โ€Yesโ€,[Date Time]>TODAY())))>>

<<COUNT(FILTER(โ€œVehicle Movementsโ€, AND ([Searched]=โ€Noโ€,[Date Time]>TODAY())))>>

These are two items I have within the report (There are more). I would like to perform a division sum within the report. I've tried the following:

<<SUM(COUNT(FILTER(โ€œVehicle Movementsโ€, AND ([Searched]=โ€Yesโ€,[Date Time]>TODAY())))/COUNT(FILTER(โ€œVehicle Movementsโ€, AND ([Searched]=โ€Noโ€,[Date Time]>TODAY()))))>>

but it says SUM is used incorrectly.

Solved Solved
0 4 212
1 ACCEPTED SOLUTION

Test:
Try circling the parameters of the DECIMAL(...) function

DECIMAL(A)/DECIMAL(B)*100

View solution in original post

4 REPLIES 4

JSO
Silver 2
Silver 2

Test:
<<COUNT(FILTER(โ€œVehicle Movementsโ€, AND ([Searched]=โ€Yesโ€,[Date Time]>TODAY()))) + COUNT(FILTER(โ€œVehicle Movementsโ€, AND ([Searched]=โ€No โ€,[Date Time]>TODAY())))>>

The Addition works absolutely fine but when performing a division it returns 0(Zero). I think it is because it is not a full number but a decimal. So trying to perform a percentage calculation (A / B * 100).

Test:
Try circling the parameters of the DECIMAL(...) function

DECIMAL(A)/DECIMAL(B)*100

That my friend works perfectly! Your a Steely Eyed Missile Man! Thank you.

Top Labels in this Space