【问题标题】:How to apply logical opertaor condition on filters using pivottable.js如何使用 pivottable.js 在过滤器中应用逻辑运算符条件
【发布时间】:2017-02-10 14:11:06
【问题描述】:

我正在使用 pivottable.js 创建动态报告,但问题是我无法确定在选定列过滤器上应用逻辑运算符的位置

示例数据:

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
}]

现在我想要的是选择所有数据,其中 (billedamount > 50 OR balance > 0) AND totalappliedamount > 200

【问题讨论】:

    标签: pivottable.js


    【解决方案1】:

    您可以使用filter参数对数据进行预过滤:https://github.com/nicolaskruchten/pivottable/wiki/Parameters

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-20
      • 2020-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多