如何使用 pivottable.js 在过滤器上应用逻辑运算符条件
How to apply logical opertaor condition on filters using pivottable.js
我正在使用 pivottable.js 创建动态报告,但问题是我无法确定在 selected 列过滤器
上应用逻辑运算符的位置
示例数据:
var mdata = [
{
"id": "1",
"billedamount": 120.00,
"totalappliedamount": 220.00,
"balance": -100.00,
"primarypayment": 104.90,
"patientpayment": 20.00
},
{
"id": "2",
"patient": "Nicole Ruisi-1000163",
"billedamount": 920.00,
"totalappliedamount": 1261.00,
"balance": -341.00,
"primarypayment": 757.78,
"patientpayment": 0.00
},
{
"id": "3",
"patient": "MELISSA LANDON-1000487",
"billedamount": 250.00,
"totalappliedamount": 280.00,
"balance": -30.00,
"primarypayment": 124.26,
"patientpayment": 30.00
}]
现在我想要的是 select 所有数据,其中 (billedamount > 50 OR balance > 0 ) AND totalappliedamount > 200
可以使用filter
参数预过滤数据:https://github.com/nicolaskruchten/pivottable/wiki/Parameters
我正在使用 pivottable.js 创建动态报告,但问题是我无法确定在 selected 列过滤器
上应用逻辑运算符的位置示例数据:
var mdata = [
{
"id": "1",
"billedamount": 120.00,
"totalappliedamount": 220.00,
"balance": -100.00,
"primarypayment": 104.90,
"patientpayment": 20.00
},
{
"id": "2",
"patient": "Nicole Ruisi-1000163",
"billedamount": 920.00,
"totalappliedamount": 1261.00,
"balance": -341.00,
"primarypayment": 757.78,
"patientpayment": 0.00
},
{
"id": "3",
"patient": "MELISSA LANDON-1000487",
"billedamount": 250.00,
"totalappliedamount": 280.00,
"balance": -30.00,
"primarypayment": 124.26,
"patientpayment": 30.00
}]
现在我想要的是 select 所有数据,其中 (billedamount > 50 OR balance > 0 ) AND totalappliedamount > 200
可以使用filter
参数预过滤数据:https://github.com/nicolaskruchten/pivottable/wiki/Parameters