Skip to main content
Question

Calculation result as variable

  • October 19, 2023
  • 2 replies
  • 14 views

Hi Celopeers,

 

I need to have a ratio of corrected documents to all documents issued in a given period. I don't want the total number of docs to change.

Currently I am doing it in several steps: I select issue date range to get the number of documents, I insert this result into an input box (variable) and then I select correction date range. As you imagine the number of issued documents changes due to selection but thanks to the input box I can still refer to the original value stored in the variable in my ratio calculation. I am wondering if there is another possibility. Could I somehow write the result of issue date selection into a variable to replace my input box? The crucial thing it to keep the original number, so it is not affected by all other filters and selections made. I would be grateful for any tips.

2 replies

Forum|alt.badge.img+6
  • Level 0
  • 27 replies
  • February 6, 2024

Hello Aldona,

 

You can create a Static Value Variable to do just that. The way to it is as follows:

  1. Go to the slide drawer navigation icon on the top left of your analysis page and select Variables.image
  2. Click on Create variable.
  3. Create a variable name. For example, Issued_Docs.
  4. From the variable type drop-down, select "Static value".
  5. On the formula editor enter the formula for counting all issued documents and click Save. For example: Count("Table"."CaseKey")
  6. Create your ratio by using the following syntax:

"Table"."CaseKey"

/

<%= Issued_Docs %>

When selecting the date range using a date picker, the filter will not be applied on the variable.

 

More information on this type of variables here: Static Variables

 

Please let me know if your issue has been resolved.


  • Author
  • Level 4
  • 8 replies
  • February 26, 2024

Hello @paulina.vázqu,

 

Thank you for help. I've solved my issue other way however I will remember about Static Variables in future projects.

 

Best regards,

Aldona