【发布时间】:2020-11-12 18:20:33
【问题描述】:
我的可视化中有一个表格。
具有以下字段
Level1, Type ID, Group ID, Starting Value, Commission, Sales Amount, Calc Bonus Bonus
1 3 1 €5000 1 €9,838 €98.38
1 3 1 €7500 2 €9,838 €196.75 €196.75
1 3 1 €10000 3 €9,838
1 3 1 €12500 4 €9,838
1 3 1 €15000 5 €9,838
1 3 1 €17500 6 €9,838
1 3 1 €20000 7 €9,838
1 3 2 €20000 1 €119,231 €1,192.31
1 3 2 €40000 2 €119,231 €2,384.63
1 3 2 €60000 3 €119,231 €3,576.94 €3,576.94
我用 BONUS Calc 计算了一个度量值
BONUS Calc =
SUMX(FILTER('table',
AND ('table'[Type] = 3,
'table1'[Sales Amount] >= 'Table'[Starting Value])),
'table1'[Sales Amount] * 'table'[Commission])
但我想要的是专栏 Bonus
基本上,我想按级别 1、类型 ID、组 ID 进行过滤检查第一个起始值
我以为我可以对我的度量列 Bonus Calc 使用过滤器进行 Max,但我没有找到解决方案...
如果有人能给我一个线索,我很感激。 谢谢
Dim Group
Groupkey Group
1 group1
2 group2
3 group3
4 group4
5 group5
Table1
Groupkey SalesAmount
1 €9838
2 €119231
3 €
Table
Level1 ID Level1 GroupKey Group Type ID Type Starting value Comission
1 Lev1 1 group1 1 type1 €5000 1%
1 Lev1 1 group1 1 type1 €7500 2%
1 Lev1 1 group1 1 type1 €10000 3%
1 Lev1 1 group1 1 type1 €12500 4%
1 Lev1 1 group1 1 type1 €15000 5%
1 Lev1 1 group1 1 type1 €17500 6%
1 Lev1 1 group1 1 type1 €20000 7%
1 Lev1 1 group1 2 type1 €20000 1%
1 Lev1 1 group1 2 type1 €40000 2%
1 Lev1 1 group1 2 type1 €60000 3%
【问题讨论】:
-
你能解释一下 table 和 table1 是如何链接在一起的吗?
-
表和表 1 没有链接在一起,它们是事实表,在两者之间,有一个 Dim 表组,因此表链接到 Dim 组
-
为这 3 个表格提供一些示例数据和预期结果。
-
我提供了一张带样本的图片
-
数据的格式太疯狂了....