I am trying to create a crosstab based on my data. I have a company, invoice type and in the body - I am putting in a percent. I am getting #error in the body. I am using a calculation to get the percentage -
Percentage = Total invoices on time/Total invoices
Total invoices = Count([Invoice type];All)
Total invoices on Time = Sum([On Time])
On Time = if([Days]<=[Due Days]) Then 1 else 0
Days = Clearing date - Doc date
Due Days = If([Terms of Payment] = "Z00") Then 10
Else [Terms of Payment]
Please help!