Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
akriaviaan
Contributor III
Contributor III

How to calculate % in Pivot table

Hi All,

I want to calculate % of Total expression for the below scenariao.

For Breakfast-- expected o/p is 2/8,2/8,4/8  and for dinner----  75/102, 14/102,2/102 ,12/102  and for lunch  7/384,175/384......etc.

Can you help me to find logic for %Total.Please find the  attached qvw.

KPI.PNG

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

Did you try this:

count({<ShortText={'Nursing Unit Reporting Group'}>}DISTINCT (SurvID))/(count(Total<ShortText>{<ShortText={'Nursing Unit Reporting Group'}>}DISTINCT (SurvID)))

View solution in original post

4 Replies
aarkay29
Specialist
Specialist

check this

akriaviaan
Contributor III
Contributor III
Author

Hi Kay,

If my TS Logic is   = count({<ShortText={'Nursing Unit Reporting Group'}>}DISTINCT (SurvID)).

what will be %TS ? Expected o/p is 261/9245,105/9245....etcRT.PNG

aarkay29
Specialist
Specialist

Did you try this:

count({<ShortText={'Nursing Unit Reporting Group'}>}DISTINCT (SurvID))/(count(Total<ShortText>{<ShortText={'Nursing Unit Reporting Group'}>}DISTINCT (SurvID)))

akriaviaan
Contributor III
Contributor III
Author

Thanks Kay,

it is working fine by replacing shorttext with Unit