Power BI에서 언급 한 내용을 달성하는 가장 좋은 방법은 parameters
을 사용하고 검색어를 매개 변수화하여 csv 파일을 얻는 것입니다.
SalesJan2009.csv
이라는 CSV 파일이 있다고 가정 해 보겠습니다.
let
Source = Csv.Document(File.Contents("\\Mac\Home\Downloads\SalesJan2009.csv"),[Delimiter=",", Columns=12, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Transaction_date", type datetime}, {"Product", type text}, {"Price", Int64.Type}, {"Payment_Type", type text}, {"Name", type text}, {"City", type text}, {"State", type text}, {"Country", type text}, {"Account_Created", type datetime}, {"Last_Login", type datetime}, {"Latitude", type number}, {"Longitude", type number}})
in
#"Changed Type"
우리가 입력하는 사용자에게 파일 위치 (예 : \\Mac\Home\Downloads\
)를 원하는 경우, 우리는 매개 변수를 설정할 수 있습니다 당신이 전원 BI로 가져올 때 당신은 뭔가를해야한다 전원 BI에서 :
,238,581,585,732 10
그런 다음 우리는 매개 변수를 사용하는 쿼리를 업데이트 할 수 있습니다 (쿼리 -> 고급 편집기) 사용자가 나중에 매개 변수 (파일 위치)을 변경하려는 경우
let
Source = Csv.Document(File.Contents(#"FileLocation" & "SalesJan2009.csv"), ...
...
, 그들은 매개 변수를 편집 할 수 있습니다 및 변경 사항을 적용하여 데이터를 새로 고칩니다.
P.S. export the Power BI file as a template을 추가하면 사용자가 새로운 Power BI Desktop 보고서 (PBIX 파일)로 인스턴스화 할 수 있습니다.