Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Count - Sum - Set Analysis

Hello,

I have 2 Set analysis calculation.

The first is: Num(Count({<PS_II={'P1'}, Vs= {">0"} >} Distinct FD_II) / Divisor,'#.##0') This Just Count People

Second: Sum Days of some special people: Num(Sum({<PS_II={'P1'}, Vs_II = {">0"} >}Vs_II) / Divisor,'#.##0') This Formula gives *90 Days*, 43 Days, 9 Days and so on.... when I do Clic on jun, may and jun

But I need to do clic only in one month.

For example: When I do clic (Field month) - Jun I would like to obtain  = Count people with 90 Days  (Mobile)

Resume: I need to get the final count of people who are 90 days old

 

Thanks!!

 

1 Solution

Accepted Solutions
pgalvezt
Specialist
Specialist
Author

Hi Sunny thank you for your reply:

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {"">0""}>} Vs_II)/Divisor) >= 90"}>} Distinct FD_II) / Divisor),'#.##0')

if I remove the parentheses before my variable, it starts to work, now I have to see the form that it takes me 3 months, so that it counts me 90 days. Being stopped in the last month that I count the days of 3 months ago.

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {"">0""}>} Vs_II)/Divisor) >= 90"}>} Distinct FD_II) / Divisor,'#.##0')

View solution in original post

5 Replies
Kushal_Chawda

may be this

 

num((Count({<PS_II={'P1'}, Vs= {">0"} ,FD_II={"=(Sum({<PS_II={'P1'}, Vs_II = {">0"} >}Vs_II) / Divisor)=90"}>} Distinct FD_II) / Divisor),'#.##0') 

 

sunny_talwar

Slight change to make sure we either add escape sequence for the inner double quote

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {"">0""}>} Vs_II)/Divisor) = 90"}>} Distinct FD_II) / Divisor),'#.##0')

or use [] instead of "" for inner set

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {[>0]}>} Vs_II)/Divisor) = 90"}>} Distinct FD_II) / Divisor),'#.##0')

Also, may be it should be >= 90 days? I am not sure, but I have a feeling we check for >= 90 instead = 90

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {"">0""}>} Vs_II)/Divisor) >= 90"}>} Distinct FD_II) / Divisor),'#.##0')
pgalvezt
Specialist
Specialist
Author

Hi Sunny thank you for your reply:

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {"">0""}>} Vs_II)/Divisor) >= 90"}>} Distinct FD_II) / Divisor),'#.##0')

if I remove the parentheses before my variable, it starts to work, now I have to see the form that it takes me 3 months, so that it counts me 90 days. Being stopped in the last month that I count the days of 3 months ago.

Num(Count({<PS_II = {'P1'}, Vs = {">0"}, FD_II = {"=(Sum({<PS_II = {'P1'}, Vs_II = {"">0""}>} Vs_II)/Divisor) >= 90"}>} Distinct FD_II) / Divisor,'#.##0')

sunny_talwar

Which variable?

pgalvezt
Specialist
Specialist
Author

Sorry not variable.. Field (Divisor)