0 Replies Latest reply: Oct 5, 2018 5:18 AM by Pasquale Cosimato

# Formula in Qlik sense

Hello,

I need your helps to create a formula.

I have this table

day                               count_lgn         1_Day_back               2 Days_back               3 Days_back

10.05.2018                         100                        45                              88                              11

10.04.2018                         88                           11                             22                              65

Now let's assume that day is my column called 'DAY'

Count login in qlik sense is my count(user_login)

now in 1_Day back column I have to calculate the count(user_login) for 1_day_back means 10.04.2018 but just considering the user_login that are counted in 10.05.2018.

-->for the day 10.05.2018 my formula per 1_Day_back should count:

count (user_login) where day = (day-1) and user_login in (user_login of 10.05.2018)

-->for the day 10.04.2018 my formula per 1_Day_back should count:

count (user_login) where day = (day-1) and user_login in (user_login of 10.05.2018)

-->for the day 10.05.2018 my formula per 2_Day_back should count:

count (user_login) where day = (day-2) and user_login in (user_login of 10.05.2018)

Thaks for any helps,

Best