March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am having an issue with values showing up in Power BI. As you can see in the images below, when I am in the Query Editor, there are values in the query, but when I load in Power BI, I do not see anything.
The values are brought into my query via merged queries (first two columns) and then calculated queries (second two columns).
The values are brought into my query via merged queries (first two columns) and then calculated queries (second two columns).
Hi @jcruise,
What is your data source? Please share us source file for further troubleshooting if possible.
Also would you please post screenshots about that how you take the "merge queries" and "calculated queries" operation?
Thanks,
Lydia Zhang
Hi Lydia,
First: I bring the data in from SQL Databases as follows (Query named Staging):
let
Source = Sql.Database("admin-dwreports", "Marketing"),
#"Filtered Rows" = Table.SelectRows(Source, each Text.EndsWith([Name], "1_AccountView") or Text.EndsWith([Name], "0_AccountView") or Text.EndsWith([Name], "9_AccountView") or Text.EndsWith([Name], "8_AccountView")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Name"}),
#"Invoked Custom Function" = Table.AddColumn(#"Removed Other Columns", "fnSummarizeAccountView", each fnSummarizeAccountView([Name]))
in
#"Invoked Custom Function"
Second: I created three identical queries to get my basic values and then merge them into one using prior year (PY) date to match with date of the record:
let
Source = Staging,
...(excluded some filtering, change types not pertinent)
//created some prior year and prior quarter dates to match with record
#"Inserted PY" = Table.AddColumn(#"Changed Type", "EndOfYear", each Date.AddYears(Date.EndOfYear([fnSummarizeAccountView.BusinessDate]),-1), type date),
#"Inserted PQ" = Table.AddColumn(#"Inserted PY", "EndOfQuarter", each Date.AddQuarters(Date.EndOfQuarter([fnSummarizeAccountView.BusinessDate]),-1), type date),
#"Renamed Columns" = Table.RenameColumns(#"Inserted PQ",{{"EndOfYear", "PY"}, {"EndOfQuarter", "PQ"}}),
//merged queries based on date of the PY/PQ dates with similar base queries
#"Merged Queries" = Table.NestedJoin(#"Renamed Columns",{"PY", "fnSummarizeAccountView.Division", "fnSummarizeAccountView.PBRegion", "fnSummarizeAccountView.PBBranch", "fnSummarizeAccountView.Category", "fnSummarizeAccountView.Classification"},PY,{"fnSummarizeAccountView.BusinessDate", "fnSummarizeAccountView.Division", "fnSummarizeAccountView.PBRegion", "fnSummarizeAccountView.PBBranch", "fnSummarizeAccountView.Category", "fnSummarizeAccountView.Classification"},"NewColumn",JoinKind.LeftOuter),
#"Expanded NewColumn" = Table.ExpandTableColumn(#"Merged Queries", "NewColumn", {"fnSummarizeAccountView.SumNSBalance"}, {"NewColumn.fnSummarizeAccountView.SumNSBalance"}),
#"Renamed Columns1" = Table.RenameColumns(#"Expanded NewColumn",{{"NewColumn.fnSummarizeAccountView.SumNSBalance", "PYBalance"}}),
#"Merged Queries1" = Table.NestedJoin(#"Renamed Columns1",{"PQ", "fnSummarizeAccountView.Division", "fnSummarizeAccountView.PBRegion", "fnSummarizeAccountView.PBBranch", "fnSummarizeAccountView.Category", "fnSummarizeAccountView.Classification"},PQ,{"fnSummarizeAccountView.BusinessDate", "fnSummarizeAccountView.Division", "fnSummarizeAccountView.PBRegion", "fnSummarizeAccountView.PBBranch", "fnSummarizeAccountView.Category", "fnSummarizeAccountView.Classification"},"NewColumn",JoinKind.LeftOuter),
#"Expanded NewColumn1" = Table.ExpandTableColumn(#"Merged Queries1", "NewColumn", {"fnSummarizeAccountView.SumNSBalance"}, {"NewColumn.fnSummarizeAccountView.SumNSBalance"}),
#"Renamed Columns2" = Table.RenameColumns(#"Expanded NewColumn1",{{"NewColumn.fnSummarizeAccountView.SumNSBalance", "PQBalance"}, {"fnSummarizeAccountView.SumNSBalance", "SumNSBalance"}, {"fnSummarizeAccountView.Classification", "Classification"}, {"fnSummarizeAccountView.Category", "Category"}, {"fnSummarizeAccountView.PBBranch", "PBBranch"}, {"fnSummarizeAccountView.PBRegion", "PBRegion"}, {"fnSummarizeAccountView.Division", "Division"}, {"fnSummarizeAccountView.BusinessDate", "BusinessDate"}}),
//calculated columns below to get year to date and quarter to date
#"Inserted Subtraction" = Table.AddColumn(#"Renamed Columns2", "Inserted Subtraction", each [SumNSBalance] - [PYBalance], type number),
#"Inserted Subtraction1" = Table.AddColumn(#"Inserted Subtraction", "Inserted Subtraction.1", each [SumNSBalance] - [PQBalance], type number),
#"Renamed Columns3" = Table.RenameColumns(#"Inserted Subtraction1",{{"Inserted Subtraction", "YTDGrowth"}, {"Inserted Subtraction.1", "QTDGrowth"}})
in
#"Renamed Columns3"
Hi @jcruise,
When you create a table visual using these fields (PYBalance,PQBalance,YTDGrowth,QTDGrowth) in Report view of Power BI Desktop, are there any results?
Thanks,
Lydia Zhang
Hi Lydia @v-yuezhe-msft,
I think I have found my issue with the underlying data. I think the structure of my queries is not very functional. Thanks for the help!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |