Repository: akvo/akvo-rsr

Issue:
Feature Request: Export numerator and denominator values for quantitative indicators defined as percentages
### What are you trying to do?

When defining indicators, we can define the indicator as a percentage or as a unit.
![image](https://user-images.githubusercontent.com/1705263/225544432-cd0366d6-e584-454a-983a-1ce12fc9acb5.png)

If the indicator is defined as a percentage, at the point of adding an indicator update the user provides 2 values;  a numerator and a denominator.
![image](https://user-images.githubusercontent.com/1705263/225544489-8cd699ae-ea9c-427a-9370-57748d4b4bf2.png)

A calculated value is then automatically generated and this calculated value is available on the export of the results and indicators table
![image](https://user-images.githubusercontent.com/1705263/225545689-b7c139d5-b257-4c46-8629-d2cf24892d8c.png)
![image](https://user-images.githubusercontent.com/1705263/225545976-c9983122-e9ee-4de9-825a-bd451dbd9b13.png)


### Describe the solution you'd like

As part of the export, I would like to see the actual values that are used to generate the percentage value i.e. I would like the value of the numerator and denominator as keyed in by the user included in the excel export.

![image](https://user-images.githubusercontent.com/1705263/225550311-20ceb28e-a5e4-4cc9-8062-05e9c9f2eada.png)

![image](https://user-images.githubusercontent.com/1705263/225547000-3270f56a-804b-4d00-89d2-7165c932c7f2.png)


### Have you consider alternatives?

_No response_

### Additional context

_No response_


Discussion:

Resolving patch:
diff --git a/akvo/rsr/views/py_reports/project_results_indicators_excel_report.py b/akvo/rsr/views/py_reports/project_results_indicators_excel_report.py
--- a/akvo/rsr/views/py_reports/project_results_indicators_excel_report.py
+++ b/akvo/rsr/views/py_reports/project_results_indicators_excel_report.py
@@ -172,7 +172,7 @@ def render_result_by_type_sheets(wb, project, results_by_types, disaggregations,
         font=Font(size=12),
         fill=Fill(background=Color(211, 211, 211))
     )
-    disaggregations_column_start = 14
+    disaggregations_column_start = 16
     disaggregations_last_colnum = disaggregations_column_start - 1 + (disaggregation_types_length * 2)
 
     for type, results in results_by_types.items():
@@ -185,10 +185,10 @@ def render_result_by_type_sheets(wb, project, results_by_types, disaggregations,
         ws.set_col_style(6, Style(size=20))
         ws.set_col_style(7, Style(size=20))
         ws.set_col_style(8, Style(size=30))
-        for i in range(9, 14):
+        for i in range(9, 16):
             ws.set_col_style(i, Style(size=25))
         ws.set_row_style(1, Style(size=36))
-        for i in range(1, 14):
+        for i in range(1, 16):
             ws.set_cell_style(1, i, header_style)
         ws.set_cell_value(1, 1, 'Project title')
         ws.set_cell_value(1, 2, 'Result title')
@@ -209,7 +209,9 @@ def render_result_by_type_sheets(wb, project, results_by_types, disaggregations,
             col += 1
             ws.set_cell_value(1, col, 'Reporting period')
         ws.set_cell_value(1, 12, 'Actual value')
-        ws.set_cell_value(1, 13, 'Actual comment')
+        ws.set_cell_value(1, 13, 'Numerator')
+        ws.set_cell_value(1, 14, 'Denominator')
+        ws.set_cell_value(1, 15, 'Actual comment')
         if disaggregation_types_length:
             col = disaggregations_column_start
             for category, types in disaggregations.items():
@@ -287,10 +289,12 @@ def render_row(ws, project, row, result, indicator, period, disaggregations={},
         ws.set_cell_style(row, col, long_text_style)
         ws.set_cell_value(row, col, period.target_comment)
     ws.set_cell_value(row, 12, period.pending_value if only_pending_updates else period.actual_value)
-    ws.set_cell_style(row, 13, long_text_style)
-    ws.set_cell_value(row, 13, period.actual_comment if not only_pending_updates else '')
+    ws.set_cell_value(row, 13, period.pending_numerator if only_pending_updates else period.updates_numerator)
+    ws.set_cell_value(row, 14, period.pending_denominator if only_pending_updates else period.updates_denominator)
+    ws.set_cell_style(row, 15, long_text_style)
+    ws.set_cell_value(row, 15, period.actual_comment if not only_pending_updates else '')
     if period.is_quantitative:
-        col = 14
+        col = 16
         for category, types in disaggregations.items():
             for type in [t for t in types.keys()]:
                 ws.set_cell_value(row, col, period.get_aggregated_disaggregation_value(category, type) or '')


Test patch: