Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
RC_121985
Contributor III
Contributor III

Pivot showing Percentage of row parent total without changing with filter in Row or Column

Hi Experts,

I am facing issue with change in the % when the filter with values in Column.

Below is the sample and out put that i have now.

  Totals Header Totals Items
UID   Match Mismatch Missing   Match Mismatch
000000337102 100.00% 57.14% 14.29% 28.57% 100.00% 83.33% 16.67%
000000337107 100.00% 85.71% 0.00% 14.29% 100.00% 83.33% 16.67%
Grand Total 100.00% 71.43% 7.14% 21.43% 100.00% 83.33% 16.67%

 

Everything working fine. If i select any value from UID it is showing the same value, but If I select any values from Header/Items (Match/Mismatch/Missing) i see % gets changed. So I should see same value as above no change in the % if there is ant filter.

I have set expression as below;

Count({$< STEP = {'VAL'}, Field 2-= {'Amount helper'}, Result -={'NA'}>}[Registration ID]) /
Count({$< STEP= {'VAL'}, Field 2 -= {'Amount helper'},Result -={'NA'}>} Total<UID, Field_Type > [Registration ID])

Basically i am looking for a Pivot where Filter should be possible but it should not change the values or % when it is filtered.

Attached Sample data

1 Solution

Accepted Solutions
RC_121985
Contributor III
Contributor III
Author

I some how got the result, But Not completely happy. I have set expression as below and for filtering Managed it with Vizlib Pivot.

if(GetSelectedCount(Result)>0,

(Count({$< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}[Registration ID])
/
Count({1< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}total<UID, Field_Type>[Registration ID])),

(Count({$< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}[Registration ID])
/
Count({$< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}total<UID, Field_Type >[Registration ID])))

 

If any one have any other solution please let me know. I want set analysis to Calculate the % even after Filter.

Till then setting this as a solution 

Thanks,

 

 

View solution in original post

4 Replies
albertovarela
Partner - Specialist
Partner - Specialist

What if you disregard selections on those 2 fields?

Count({$< STEP = {'VAL'}, Field 2-= {'Amount helper'}, Result -={'NA'},Header=,Items=>}[Registration ID]) /
Count({$< STEP= {'VAL'}, Field 2 -= {'Amount helper'},Result -={'NA'},Header=,Items=>} Total<UID, Field_Type > [Registration ID])

RC_121985
Contributor III
Contributor III
Author

Hi Alberto,

Thanks for your reply. Expression you provided is not giving me the desired output. 2 Fields in Red are the Values from "Field_Type", these are not Fields.

So Do you want me try as below?

Count({$< STEP = {'VAL'}, Field 2-= {'Amount helper'}, Result -={'NA'},Field_Type=>}[Registration ID]) /
Count({$< STEP= {'VAL'}, Field 2 -= {'Amount helper'},Result -={'NA'},Field_Type=>} Total<UID, Field_Type > [Registration ID])

?

Thanks

 

RC_121985
Contributor III
Contributor III
Author

Any other way to do this?

 

RC_121985
Contributor III
Contributor III
Author

I some how got the result, But Not completely happy. I have set expression as below and for filtering Managed it with Vizlib Pivot.

if(GetSelectedCount(Result)>0,

(Count({$< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}[Registration ID])
/
Count({1< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}total<UID, Field_Type>[Registration ID])),

(Count({$< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}[Registration ID])
/
Count({$< STEP = {'VAL'},Field 2 -= {'Amount helper'},Result -={''}>}total<UID, Field_Type >[Registration ID])))

 

If any one have any other solution please let me know. I want set analysis to Calculate the % even after Filter.

Till then setting this as a solution 

Thanks,