Level of aggregation question

I want to be able to obtain the fraction on the right most column.

Company Late? (boolean) count of jobs total jobs by company fraction
A 1 5 12 5/12
A 0 7 12 7/12
B 1 9 15 9/15
B 0 6 15 6/15
B 1 5 8 5/8
B 0 3 8 3/8

This is what I am using right now for the two previous columns.

count of jobs
distinct_count({Job_IDs}, [{company},{Late?}])

total jobs by company

I just divide the count of jobs by the total number of jobs by company but qs is not letting me because my numerator and denominator have different levels of aggregation.

Hi @mateoleon210, can you try an aggregate function for both numerator and denominator separately and then divide. For example min(job count)/avg(total jobs) so that both calculations are at the same aggregation level in the visual and then do the division. Without aggregations, numerator and denominators are not at the visual level. Example, for count of jobs even though you have distinct count defined in the calculated field, you must have selected an aggregation level (such as min, max etc) from this table visual field wells.

Let me know if this helps you resolve your issue.