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

How to use An Expression to divide the count of a column by the sum of other column

I have used this expression, but doesn't work:qlik.PNG

 

Count(Distinct MemberId)/ Sum( TotalYearlyMemsWITE)

6 Replies
Kushal_Chawda

@Tarig  what is wrong here

Tarig
Contributor III
Contributor III
Author

my expression is not working for some reasons

 

avinashelite

Could you explain what is not working the your excepted results ? that will help us to guide 

Tarig
Contributor III
Contributor III
Author

Sorry for that, I have two columns, MemberId and TotalYearlyMemsWIT. What I am trying to do is writing an expression that will count the distinct MemberId and divided by the Sum of TotalYearlyMemsWIT to get the % of each year in a pivot table, so I have tried this expression but it doesn't work: Count(Distinct MemberId)/ Sum( TotalYearlyMemsWITE) . Wondering if there is other way to do it. thank you for your time and help.

QFabian
Specialist III
Specialist III

Hi, be carefull with the uppercase letters, you put :

  • Count(Distinct MemberId)/ Sum( TotalYearlyMemsWITE)

and the fields as shown in the table are:

  • Count(Distinct MemberID)/ Sum( TotalYearlyMemsWITE)
QFabian
qliksrikanth
Contributor III
Contributor III

@Tarig, Please mention the requirement clearly. 
Check the image attached. It's working for me.

Tried to reply last light but had connection issue.

Tarig.PNG