1

我正在尝试根据表中的标准总数来计算评分阈值。但由于某种原因,我无法获得变量的值。我尝试了 Qliksense 手册中的每种语法组合。您能否帮助我通过评估每个变量的表达式并描述评级映射表来获得评级映射表中的实际数字?

[Data Structure]:
LOAD [Resource],
    [Criteria],
    [Sub-Criteria],
    [Weight],
    [Value],
([Weight]*[Value]) As [Score]
FROM [lib://econtent dashboard/Final weighted criteria 7-20-15.xlsm]
(ooxml, embedded labels, table is [Data Structure]);


LET vNumberofCriteria=$(=Count(distinct [Criteria]));
LET vThresholds=$(=vNumberofCriteria*100);
LET vTr1=$(#vThresholds);
LET vTr2=$(=2*$(#vTr1));
LET vTr3=$(=3*$(#vTr1));
LET vTr4=$(=4*$(#vTr1));
LET vTr5=$(=5*$(#vTr1));


[Rating Mapping]:
 Load * INLINE [
    Treshhold, Rating, Image Location
    0, NA, http://localhost:4848/content/default/notavailable.png
    $(#vTr1), Unsatisfactory,   http://localhost:4848/content/default/unsatisfactory.png
    $(#vTr2), Marginal, http://localhost:4848/content/default/marginal.png
    $(#vTr3), Good, http://localhost:4848/content/default/good.png
    $(#vTr4), Satisfactory, http://localhost:4848/content/default/satisfactory.png
    $(#vTr5), Superior, http://localhost:4848/content/default/superior.png
];

谢谢

4

1 回答 1

0

您不能以这种方式对变量求和,因为它不知道您正在查看哪个表。

您可以创建一个临时表来进行聚合,然后使用 peek 将其分配给您的变量。

[DataStructureCount]:
LOAD
Count(distinct [Criteria]) as CriteriaCount
RESIDENT [Data Structure];

Let vNumberofCriteria= peek('CriteriaCount',0,'DataStructureCount');

DROP TABLE DataStructureCount;
于 2016-04-25T12:08:49.057 回答