Need a special offer?Find out if your project fits.
+

Question re summary report with custom calculated field

Answered
abie@inflowcare.com asked on April 25, 2024

I have a question about setting up a custom calculated field under the summary view in one of our reports. I've attached a screenshot. 

I'm trying to add one column to the right with a custom-calculated field. The field would be the conversion rate which is column 2 divided by column 5 as per the screenshot.

 

Thanks,

Abie

Attachments:
Flexmonster question

1 answer

Public
Maksym Diachenko Maksym Diachenko Flexmonster April 29, 2024

Hello,

Thank you for reaching out to us. 

Please note that our current grid implementation is designed to calculate a grand total by aggregating subtotals from different field members. The final figure at the end is the sum of all these cells. Due to such a design, it would not be possible to append a single column after subtotals. However, a similar functionality can be achieved using the calculated values - Flexmonster's feature that allows creating measures missing from the original dataset.

Adding a "Rate to Total" measure

This approach utilizes a "percentofparentcolumntotal" aggregation to show a column's value divided by the total next to each "Referral ID" count. This aggregation is formatted as percent, so you should wrap it inside the calculated value to show the fraction:

{
"uniqueName": "Rate to Total",
  "formula": "percentofparentcolumntotal(\"ReferralId\") / 100",
  "caption": "Rate to Total"
}

Check the full example: https://jsfiddle.net/flexmonster/1wr9hjt8/ 
While having a different appearance from the explanation provided in Flexmonster_question.png, this provides a relatively simple solution that requires no changes to the dataset. 

Showing each measure as a separate calculated value

Contrary to the previous example, this method excludes the "Referral Patient Status" from columns and provides the sums of "Referral ID" for each status and the total sum as separate measures. With such a layout, it would be possible to append a single measure with a fraction of "Referral ID" with the status "Active" and a total count of "Referral ID".

However, since Flexmonster only supports numeric conditions inside the calculated values, you would have to add numeric identifiers corresponding to each "Referral Patient Status" value ("Active" - 1, "Lost" - 2, "Pending" - 3). Then, by using the "if" conditional operator, it is possible to calculate the "Referral ID" count sum for each status and the aforementioned fraction.
You are welcome to check the example: https://jsfiddle.net/flexmonster/mzpen280/ 

Please let us know if one of the approaches described works for you.

Best Regards,
Maskym

Please login or Register to Submit Answer