Template:CQ-GetPercentageDifference/doc

Description
This is a Cargo template for calculating the percentage difference the total sum of two Cargo table columns. Mainly used for calculating win/loss percentage but can be done for any numeral value. The formula used is: 100 * comparevalue / (comparevalue + compareagainst).

Syntax
{	"params": { "tables": { "label": "Tables", "description": "Name of Cargo table(s) for comparison", "type": "string", "required": true },		"filters": { "label": "Filters", "description": "Criteria for getting specific rows. The use of AND/OR will allow multiple criteria if needed.", "example": "Player='Jim', Player='Todd' AND Tournament='IAS1', etc", "type": "string", "suggested": true },		"comparevalue": { "label": "Compare value", "description": "Name of column in Cargo table(s) to compare with.", "type": "string", "required": true },		"compareagainst": { "label": "Compare against", "description": "Name of column in Cargo table(s) to compare against. This is added to the compare value during calculation.", "type": "string", "required": true }	},	"description": "This is a Cargo template for calculating the percentage difference the total sum of two Cargo table columns. Mainly used for calculating win/loss percentage but can be done for any numeral value.", "format": "inline" }