Calculation using virtual columns

Hi!

I am trying to do a simple calculation in a virtual column using the AppFormula results of two other virtual columns that are outputting a number (via a COUNT expression) as variables, but the result is always “0”. I am trying to divide the results of one virtual column by the other to generate a decimal output. Any ideas on what I’m doing wrong?

Can you validate that the output of these 2 columns you’re dividing are not 0?

The two columns are generating correct outputs individually, however when I test the third column AppFormula it’s outputting zero, also when displaying in a view. Here is how I have it structured:

Cancellations 30 Days (virtual column): COUNT(FILTER(“Invoice Detail”, AND([_THISROW].[Client Name]=[Client Name], [Invoice Data::Item]=“C/C”, ([Invoice Data::VisitDate] <= TODAY()), ([Invoice Data::VisitDate] >=TODAY()-30))))

Total Appointments: 30 Days (virtual column): COUNT(FILTER(“Invoice Detail”, AND([_THISROW].[Client Name]=[Client Name], ([Invoice Data::VisitDate] <= TODAY()), ([Invoice Data::VisitDate] >=TODAY()-30))))

Fulfilled Appointments: [Total Appointments: 30 Days] - [Cancellations 30 Days]

Attendance Rate: 30 Days: [Fulfilled Appointments] / [Total Appointments: 30 Days]

All the virtual columns up to the last one are calculating correctly.

1 Like

That did it! Thanks for your help.

1 Like