Skip to content
Advertisement

Calculate proportion (percent) [closed]

Could you help me to calculate proportion of

If user has attendance there is 1, otherwise – Null.

Need to calculate percent of attendance during 01.01.18 – 02.01.18. For instance, on 01.01.2018 there were 1 user of two (50%), on 02.01.2018 – 100%.

Tnanks!

Advertisement

Answer

You may try this query:

This assumes that a given user would only appear at most once in attendance for a given date. It also assumes that your Date column is an actual date column, and not just text.

enter image description here

Demo

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement