{% extends "base.html" %} {% block title %} Home Page {% endblock %} {% block content %}
{% for header in summary_data[0] %} {% if header not in ['Initiative', 'Project Count', 'Delayed Projects', 'Total Executer Delayed Projects'] %} {% endif %} {% endfor %} {% for row in summary_data %} {% for header in row %} {% if header not in ['Initiative', 'Project Count', 'Delayed Projects', 'Total Executer Delayed Projects'] %} {% endif %} {% endfor %} {% endfor %} {% for header in summary_data[0] %} {% if header not in ['Initiative', 'Project Count', 'Delayed Projects', 'Total Executer Delayed Projects'] %} {% endif %} {% endfor %} {% set ns = namespace(total_percentage=0) %} {% for header in summary_data[0] %} {% if header not in ['Initiative', 'Project Count', 'Delayed Projects', 'Total Executer Delayed Projects'] %} {% set percentage = (summary_data | sum(attribute=header) / (summary_data | sum(attribute='Total Executer Delayed Projects')) * 100) %} {% set ns.total_percentage = ns.total_percentage + percentage %} {% endif %} {% endfor %} {% for header in summary_data_meta.executor_columns %} {% endfor %}
SN INITIATIVE PROJECT COUNT DELAYED PROJECTS {{ header | upper }} TOTAL
{{ loop.index }} {{ row.Initiative }} {{ row['Project Count'] }} {{ row['Delayed Projects'] }} {% if row[header] > 0 %} {{ row[header] }} {% endif %} {{ row['Total Executer Delayed Projects'] }}
Total {{ summary_data | sum(attribute='Project Count') }} {{ summary_data | sum(attribute='Delayed Projects') }} {{ summary_data | sum(attribute=header) }} {{ summary_data | sum(attribute='Total Executer Delayed Projects') }} Number of Projects Delayed
Overall Delay {{ (summary_data | sum(attribute='Total Executer Delayed Projects') / (summary_data_meta.total_projects_by_executor.values() | sum) * 100) | round(2) }}% {{ percentage | round(2) }} {{ ns.total_percentage | round(2) }}% % of Delayed
{% if summary_data_meta.total_projects_by_executor.get(header, 0) > 0 %} {{ summary_data_meta.total_projects_by_executor.get(header, 0) }} {% endif %} {{ summary_data_meta.total_projects_by_executor.values() | sum }} Total Projects

Records found:

{% for header in headers %} {% endfor %} {% for row in table_data %} {% for value in row.values() %} {% endfor %} {% endfor %}
{{ header }}
{{ value }}
{% endblock %}