【问题标题】:How to compare two of the same fields in different data sets如何比较不同数据集中的两个相同字段
【发布时间】:2016-07-19 15:37:56
【问题描述】:

我有这两个数据集

  • 购买的类别,显示客户购买的类别
  • All Categories即所有商品类别

我想要做的是比较 Categories Bought psd_parentproductcategoryid 并将其与 All Categories psd_parentproductcategoryid 进行比较,以找出未出现在 中的类别>已购买的类别结果

我使用的是 FetchXML 而不是 SQL。

【问题讨论】:

    标签: reporting-services fetchxml


    【解决方案1】:

    您应该能够对此使用查找:

    =lookup(Fields!psd_parentproductcategoryid.Value,Fields!psd_parentproductcategoryid.Value.Value, Fields!psd_parentproductcategoryid.Value, "AllCategories")
    

    过滤器部分可能很棘手。我找不到我的例子,但有办法。希望这至少可以让你开始。

    **编辑

    我有一个名为 Present 的参数。我要过滤数据集时传递的值为0。

    这是 tablix 上的过滤器代码:

    =iif(Parameters!Present.Value = 0 , lookup(Fields!psd_parentproductcategoryid.Value,Fields!psd_parentproductcategoryid.Value.Value, Fields!psd_parentproductcategoryid.Value, "AllCategories") is nothing, "FALSE", "TRUE"), "TRUE")
    

    **编辑 2 您可以将其添加到过滤器中,以仅返回其他数据集中不存在的值。

    IIF(=lookup(Fields!psd_parentproductcategoryid.Value,Fields!psd_parentproductcategoryid.Value.Value, Fields!psd_parentproductcategoryid.Value, "AllCategories") is nothing, Fields!psd_parentproductcategoryid.Value, nothing)
    

    【讨论】:

    • 感谢 ISW :)。它是一个开始,它返回与类别购买结果相同的值,希望我能找到其他东西来返回不存在的那些
    猜你喜欢
    • 1970-01-01
    • 2021-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-02
    • 1970-01-01
    • 2023-04-11
    相关资源
    最近更新 更多