powerbi - 在 PowerBI 中添加具有硬编码值的列
问题描述
这可能非常简单,但我找不到答案。我创建了一个新列,我想使用 DAX 语法用硬编码值填充该列。
我可以这样写:Column = 10
我会得到一列 10s 但假设我的表有 3 行,我想插入一列[10, 17, 155]
。我怎样才能做到这一点?
解决方案
Try using DATATABLE function
Table = DATATABLE("Column Name",INTEGER,{{10},{17},{155}})
You can also put more columns with their own data if you want to, check this https://docs.microsoft.com/en-us/dax/datatable-function
推荐阅读
- react-native - 如何根据用户角色限制选项卡?
- excel - 我想比较 SSIS 中两个不同 Excel 文件的行数 收到电子邮件警报
- python - 如何从 python/scipy/numpy 等中的步进函数中采样?
- python - 作为一系列字符串列表导出到 CSV 的列,在读取时 Pandas 解释为只是一系列字符串
- php - unserialize():672 字节偏移量 10 处出错
- jquery - jQuery动画幻灯片而不重绘内容
- java - 将 Single 应用于 ObservableSource 而不是过度阅读
- php - thedevdojo/chatter SQLSTATE[HY000] 外键约束
- floating-point - MIPS:除法算法(IEEE-754 格式的有效位除法)对最后 4-5 位 (LSB) 给出错误答案
- c# - 验证 Web 应用程序中的静态资源