Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sat_tok52
Creator
Creator

Percentage Calculation

Hi All,

I have to show percentage based on the visiteddate , I have a column visit-date, so  i have to show visited Account Id percentage like suppose   out 10 Acount Id's  how many id's are visited that percentage and who are not visited that percentage  .Below table Null symbol means not visited id's.

Suppose 7 id's are visited Count(VisitDate)/Count(Distinct AcctID) i.e's 7/10=70%

Suppose 3 id's are Not visited NullCount(VisitDate)/Count(Distinct AcctID) i.e's 3/10=30%

Data:

AcctIDVisitDate
110/1/2019
210/2/2019
310/3/2019
4-
510/5/2019
610/6/2019
710/7/2019
8-
910/7/2019
10-

 

Expected Result:

AcctIDVisitDateExpected Result
110/1/201970%
210/2/201970%
310/3/201970%
4-30%
510/5/201970%
610/6/201970%
710/7/201970%
8-30%
910/7/201970%
10-30%

 

Thanks.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be this

Count(DISTINCT TOTAL {<AcctID = {"=Len(Trim(VisitDate)) > 0"}>} AcctID)
/
Count(DISTINCT TOTAL AcctID)

and

Count(DISTINCT TOTAL {<AcctID = {"=Len(Trim(VisitDate)) = 0"}>} AcctID)
/
Count(DISTINCT TOTAL AcctID)

 

View solution in original post

2 Replies
sunny_talwar

May be this

Count(DISTINCT TOTAL {<AcctID = {"=Len(Trim(VisitDate)) > 0"}>} AcctID)
/
Count(DISTINCT TOTAL AcctID)

and

Count(DISTINCT TOTAL {<AcctID = {"=Len(Trim(VisitDate)) = 0"}>} AcctID)
/
Count(DISTINCT TOTAL AcctID)

 

sat_tok52
Creator
Creator
Author

Hi Sunny,

Thanks for your quick reply.It's working like what i am expecting.

Thanks.