dax - PowerBI:按对外部过滤器敏感的类别计算百分比
问题描述
首先,感谢您花时间阅读我的问题:)。
我有下表:
ISO_code | Q7_1.其他中央政府机构 | OGP | 文件类型 |
---|---|---|---|
精氨酸 | 0 | OGP | OGP/开放政府 |
手臂 | 1 | 非 OGP | 数字化/数字政府 |
我想按文档类型(例如 OGP/Open Government)计算 Q7_1(例如总理)的每个答案的百分比,因此我生成了测量公式:
Q7. Central gov institutions = DIVIDE(CALCULATE(SUM('Multiple
answer'[Q7_1.othercentralgovagency]),ALLEXCEPT('Multiple
answer','Multiple answer'[Document
Type])),CALCULATE(COUNTROWS('Multiple answer'),ALLEXCEPT('Multiple
answer','Multiple answer'[Document Type])))
这很好用,它返回“Q7_1.othercentralgovagency”(=1)占我数据集中 OGP/Open Government 总数的百分比。
但是,由于我使用了“ALLEXCEPT”,当我尝试从切片器中按“OGP”列过滤值时,结果不会改变。
如何确保我的公式考虑用户选择的任何其他过滤器?
再次感谢!
解决方案
推荐阅读
- reactjs - Loopback 4 提供的静态文件未在 kubernetes 上显示
- numpy - 张量大小未匹配损失函数
- python - 在 Python 上使用 Watchdog 时出现回溯错误
- javascript - 错误:
属性 d:预期数字 D3 - java - 我可以直接在浏览器中打开 .ftl 而不经过应用程序周期吗?
- git - 如何查看 git log 和 git status
- swift - 如何从类邮件中关闭 MFMailComposeViewController?
- c# - 禁用或灰显空值行
- c# - 将数据传递给用户控件
- c# - 使用通用主机 IHostBuilder 时检测来自 docker 的关闭信号