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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Pivoting a non-query table in Power Query Editor

I made a table "Results" using the "Enter Data" option and DAX language. The table is four columns combined from different original queries and filtered on multiple conditions based on fields in related queries. The columns are metricID, locationID, TimePeriodName, and ActualResult.  I need to pivot two of the four columns: TimePeriodName and ActualResult so that the values in TimePeriodName become columns and ActualResults values become the values for those columns while perserving the metricID, and locationID columns.

 

The problem: I see how to pivot data in the Power Query Editor but I do not know how to reference the "Results" table since it isn't a 'query' but a table constructed using DAX and several different original queries.

 

The Question: How can I reference a non-query table in Power Query? Or alternatively, how I can pivot the data the way I need to using DAX?

1 ACCEPTED SOLUTION
edhans
Super User
Super User

You cannot. Power Query cannot see tables created in DAX, nor tables from Live Connections. Power Query is an ETL tool - extract, transform, and load. Once it loads, what you do with that table on the other side in DAX, PQ cannot see those changes - so new calculated columns or calculated tables.

 

One exception is if you change a data type in Power BI. That actually goes back into Power Query and adds that Changed Type step.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

You cannot. Power Query cannot see tables created in DAX, nor tables from Live Connections. Power Query is an ETL tool - extract, transform, and load. Once it loads, what you do with that table on the other side in DAX, PQ cannot see those changes - so new calculated columns or calculated tables.

 

One exception is if you change a data type in Power BI. That actually goes back into Power Query and adds that Changed Type step.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors