PowerBi:图表中的动态维度:计算的列在切片机中修改输入参数时不会更新
我想使用户能够在PBI桌面上进行模拟。颜色与ID相关联,具体取决于ID的风险评分,并且用户可以在报告中使用的阈值。用户应该能够根据所选阈值来查看每种颜色的ID量如何变化。
数据选项卡的屏幕截图
报告选项卡的屏幕截图
=“ nofollow noreferrer”>
pbix file : https://drive.google.com/file/d/1x6u9a1vamiWnaTgJY-yYTIpANlz2FXyn/view?usp=sharing
I want to enable the user to do a simulation in PBI desktop. A color is associated to an ID depending on the risk score of the ID and a threshold the user can play with in the report. The user should be able to see how the amount of IDs per color changes depending on the threshold chosen.
Screenshot of Data tab
screenshot of report tab
I have tried using a calculated column, but as RADO pointed out, calculated columns cannot be impacted by filter changes, measures or parameters. I tried a measure which updates fine, but I cannot figure how to use this "color" measure as a axis in the plot I am trying to make.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先是一个小笔记:我将您的“表”重命名为“数据”,因为“表”是一个保留的名称;我还将自己的名字用于这些措施,并根据需要更改它们。
为分数颜色创建尺寸表:(
它类似于阈值表 - 断开连接的表)。
创建总量的度量:
创建定义分数颜色的度量。细微差别:您应该在总数中要谨慎。我选择不在总体上显示颜色,因为这没有道理。
最后,创建一个通过动态颜色计算得分量的度量:
它的工作原理:我们在ID列表上迭代,计算其得分颜色,并将其与图表轴上的颜色进行比较。如果它们匹配,则将金额添加到结果中。
最后,从X轴上的表“得分颜色”和y轴上的[动态图表]测量的表“得分颜色”创建图表:
结果:
i.sstatic.net/iixmo.png“ rel =“ nofollow noreferrer ” a href =“ https://i.sstatic.net/u9bxk.png” rel =“ nofollow noreferrer”>
A small note first: I renamed your 'Table' into 'Data', since 'Table' is a reserved name; I also used my own names for the measures, change them as necessary.
Create a dimension table for score colors:
(it's similar to the Threshold table - a disconnected table).
Create a measure for total amount:
Create a measure that defines score color. A nuance: you should be careful about what you want to see in the totals. I chose not to show color in the totals as it makes no sense.
Finally, create a measure that calculates score amount by color dynamically:
How it works: we iterate over the list of IDs, compute their score colors, and compare to the color on the chart axis. If they match, amount is added to the result.
Finally, create a chart with Color field from the table "Score Colors" on x-axis, and [Dynamic Chart] measure on y-axis:
Result: