从相对路径将数据加载到 Power BI

编程入门 行业动态 更新时间:2024-10-28 10:26:02
本文介绍了从相对路径将数据加载到 Power BI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图找到一种解决方案来加载外部数据文件,但从相对路径加载,因此当其他人打开我的 PBIX 时,它仍然可以在他/她的计算机上运行.

I am trying to find a solution to load an external data file but from a relative path, so when someone else open my PBIX it will still work on his/her computer.

非常感谢.

推荐答案

Power BI 目前*不* 支持相对路径.

Relative paths are *not* currently supported by Power BI.

为了减轻痛苦,您可以创建一个包含文件所在路径的变量,并使用该变量来确定每个表的路径.这样,您只需更改一个位置(该变量),所有表都会自动指向新位置.

To ease the pain, you can create a variable that contains the path where the files are located, and use that variable to determine the path of each table. That way, you only have to change a single place (that variable) and all the tables will automatically point to the new location.

创建一个空白查询,为其命名(例如 dataFolderPath)并输入文件所在的路径(例如 C:\Users\augustoproiete\Desktop)

Create a Blank Query, give it a name (e.g. dataFolderPath) and type in the path where your files are (e.g. C:\Users\augustoproiete\Desktop)

创建变量后,在 Advanced Editor 中编辑每个表,并将变量与文件名连接起来.

With the variable created, edit each of your tables in the Advanced Editor and concatenate your variable with the name of the file.

例如而不是 "C:\Users\augustoproiete\Desktop\data.xlsx",将其更改为 dataFolderPath &"\data.xlsx"

e.g. instead of "C:\Users\augustoproiete\Desktop\data.xlsx", change it to dataFolderPath & "\data.xlsx"

您还可以投票/观看此功能请求,以便在实施时收到通知:

You can also vote/watch this feature request to be notified when it gets implemented:

  • 支持excel/csv源的相对路径

更多推荐

从相对路径将数据加载到 Power BI

本文发布于:2023-10-30 21:59:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1544125.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:路径   加载   数据   BI   Power

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!