Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What would be the best approach for what I'm looking for, script or expression?
I have a pivot chart, below.
I need to count the total PK then divide by when Reason = Yes
End goal:
% of Reasons from total PK counts.
Example
Count of PK - 100
Count of Reason - 25
25/100 = 25%
----------------------------------------------------------------
COUNTY YEAR 2016 2015 2014
Singleton
Parry
Luck
Luke
Values
PK
Year
County
Reason
Not sure I understand
Count(PK)/Count(Reason)?
I'm having trouble following your example but I'll give it a shot. I'm going on the assumption that you are looking for a pivot table with two dimensions COUNTY and YEAR and you need a expression that is count of PK over Count of Reason where reason = Yes.
your expression would be
COUNT(PK)/SUM(IF(Reason='Yes',1,0))
If I'm not following right please post an excel or QVW that demonstrates what you want. Even if the results are wrong it will help color a picture and you can point out where it is wrong.
Yes, simple enough.
count({<REASON = {'Yes'}>}PK)/count(PK)