Show % of parent raw total in pivot table

Viewed 9

I have used this code to get the percentage of parent raw in pivot table using python. But it gives me some errors.

 pt_name = 'Automation'  # must be a string
pt_rows = ['lmsp','days_to_breach_pt']  # must be a list
pt_cols = ['cp_flag']  # must be a list
pt_filters = ['origin_type']  # must be a list
# [0]: field name [1]: pivot table column name [3]: calulation method [4]: number format
pt_fields = [['tracking_number', 'TN', win32c.xlCount, '0'],
             ['tracking_number', 'TNM', win32c.xlPercentOfParentRow,'0.00%']]

Can someone help me with that?

0 Answers
Related