【问题标题】:Get the count of repetition of values for a column in Qlik Sense获取 Qlik Sense 中列的重复值计数
【发布时间】:2022-11-08 14:10:31
【问题描述】:

我是 qlik 的新手,我有一个数据说 - “数据”,它包含四列 - “名称”、“数量”、“类别”、“模式”

'name' 基本上是客户的名字,'amount' 是总花费,'category' 就像 - 衣服、食物、小工具和 'mode' 是离线或在线。

我创建了一个向下钻取条形图,其中 x 轴为 - 名称/类别(向下钻取)和 y 轴为金额(总和)。选择特定条后,我需要在模式的两个 kpi 图表中显示重复计数

例如 - 如果我选择食物栏,kpi 将显示离线 - 32,在线 -7 基于我所做的选择,即食物

我试过了-Count({<mode={'offline'}>}mode)

但它不起作用。任何帮助将不胜感激。

【问题讨论】:

    标签: dashboard qliksense


    【解决方案1】:

    使用向下钻取时,Qlik 实际上是在选择“钻取”的值。您可以看到在选择栏中进行了选择。

    您可以根据向下钻取字段中选定值的数量构建 KPI 对象。

    GetSelectedCount 函数将返回的数量清楚的字段中的选定值。如果未选择任何内容,该函数将返回 0。

    一个示例表达式:

    = if(GetSelectedCount(category) > 0, 
        count( {<mode = {'offline'} >} category), 
        if(GetSelectedCount(name) > 0 , 
            count( {<mode = {'offline'} >} name),
            count( {<mode = {'offline'} >} SomethingElse // if nothing is selected in "name" and "category" fields
        ))
      )
    

    【讨论】:

      猜你喜欢
      • 2016-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多