Skip to main content

Hello,

 

Yesterday, i was very helpfully provide with the following calculation:

 

zn(Sum({ FIXED [Complaint Reason] : sum(if year([Date]) = 2018 Then [Number of Records] end) }))

- zn(Sum({ FIXED [Complaint Reason] : sum(if year([Date]) = 2019 Then [Number of Records] end) }))

 

This takes the number of complaints in the "Complaint Reason" Column in 2018 and takes away the same values in 2019

 

Works a treat.

 

I then made it into a group (grouping Chip 1 and Chip 2 together as "Chips"). Yay, still works.

 

However, now i want to change it and instead, rather then usual the number of each complaint, use the % of the total complaints (as the total number of Complaints varies from year to year, so i need the "Complaint Reason" to be a % of the entire year.

 

I had thought this would work:

 

sum ( [Complaint Reason (group) ]  )  /  Total (sum ( [Complaint Reason (group) ] ) )

 

However, when i do, it gives the error "Sum is being called with "String", do you mean "Float"?

 

E.g. "Too Cold" has a % Value of 17.65 in 2018 and 26.67%. I want the calculation to give me 9.02 rather then 1 (4-3=1)

 

Thank you

 

Workbook attached in a low format 2018.2

7 answers
  1. Jan 10, 2020, 4:31 PM

    Realised that I could do a calculation on the table which would give me the % for that column.

     

    Then noticed i could do a difference of the two columns, but not in the percentages at the same time.

0/9000