You need to calculate the completion ratio based on the start, end dates of project phases.
Solution
Switch the page to the edit mode.
Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
Select the macro and click Edit.
In the Presets tab select Custom transformation and click Next.
Enter the following SQL query:
SELECT *,
CASE WHEN 'Completion Ratio'>100
THEN "100%"
WHEN 'Completion Ratio'<0
THEN "0%"
ELSE ROUND('Completion Ratio')+"%"
END AS 'Completion Ratio'
FROM
(SELECT *,
DATEDIFF(DAY,'Start Date',"today")/
DATEDIFF(DAY, 'Start Date', 'End Date')*100 AS 'Completion Ratio'
FROM T1)
SQL
Click Next.
Savethe macro and the page.
Cookie Notice
This website uses cookies for analytics, personalization and advertising. By continuing to browse, you agree to our use of cookies. Learn more