Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jcruise
Regular Visitor

Values from merged queries not showing in power bi

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).

 

 

 

Power BI Image.JPGPower Query Image.JPG

4 REPLIES 4
Anonymous
Not applicable


 

The values are brought into my query via merged queries (first two columns) and then calculated queries (second two columns).

 

 

 

Power BI Image.JPGPower Query Image.JPG


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"

Anonymous
Not applicable

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 @Anonymous,

 

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!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors