powerquery - (Power BI) 将计算列转换为 Power Query
问题描述
这是我拥有的计算列代码,并希望将其转换为 Power Query。
Unique Match Column =
var consignee=CALCULATE(DISTINCTCOUNTNOBLANK(Client[Consignee]),ALLEXCEPT(Client,Client[ConsolNumber]))
var consignor=CALCULATE(DISTINCTCOUNTNOBLANK(Client[Consignor]),ALLEXCEPT(Client,Client[ConsolNumber]))
var consignee1=CALCULATE(Max(Client[Consignee]),ALLEXCEPT(Client,Client[ConsolNumber]))
var consignor1=CALCULATE(Max(Client[Consignor]),ALLEXCEPT(Client,Client[ConsolNumber]))
var match=SWITCH(TRUE(),
AND(consignor=1,consignee=1),consignee1,
consignee=1,consignee1,
consignor=1,consignor1,
AND(ISBLANK(consignor),consignee<>1),"BLANK",
AND(ISBLANK(consignee),consignor<>1),"BLANK",
"MIX")
return match
这是 pbix:https ://ufile.io/q2pty4w9
希望大家能在这件事上有所帮助。
非常感谢并感谢您的关注。
解决方案
推荐阅读
- ios - 在 Swift 中从 Objective-C 访问外部 NSString
- rust - 由于 Rust 中只能有一个所有者,这是否意味着不可能进行浅拷贝?
- r - 如何防止geom_area在ggplot2中按字母顺序排列
- mongodb - 按字段比较 2 个 mongoDb 集合的最佳方法
- apache-kafka - 在 minikube 上配置 kafka + minio
- ios - 来自 .dae 的 SCNNode 不规则平面,带有视频纹理
- perl - perl/pdl 中的八度 fminunc 交替
- python-3.x - tkinter中的背景颜色不均匀
- tmux - 退格键在 tmux 命令提示符下不起作用
- sqlite - SQLite 索引在用于定位 NULL 时会降低性能