Forum Discussion
Query result to embed table
Hello,
Is there a way to embed the query result directly to powerbi report so that I can remove the dependence on the external file? The ideal case would be the "Enter Data" but the data is a little messy and typing them in one by one is not the best idea.
Thanks a lot,
- Anonymous5 years ago
Hi bobli ,
You could use Import mode to load data first, then copy the table and paste the table in enter data feature.
Best Regards,
Jay
9 Replies
- parry2kSuper User
bobli yes you can add data directly in Power BI if you don't want to read it from any source.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- PhilipTreacySuper User
Hi bobli
You could use DAX to create the table directly in the Data Model.
Creating a Table in Power BI Using DAX Table Constructor - RADACAD
Create Static Tables in DAX Using the DATATABLE Function - SQLBI
Using DataTable DAX Function for Creating Structured Table in Power BI - RADACAD
regards
Phil
- bobliFrequent Visitor
Thanks for the advice. Is there any reference to pass the query result into the Table or DataTable function?
- PhilipTreacySuper User
Hi bobli
Sorry I don't know any way to explicitly do that. Once the data is loaded into PQ it is automatically loaded into the Data Model on Close & Apply.
Regards
Phil
- parry2kSuper User
bobli having said that I wouldn't recommend this method as it is not a scalable method if you really going to change values or adding new data. These approaches are more of storing some config values etc but not for maintaining the data. In this case, I would recommend doing transformation on your data file (even it is a bad format but hope there is a pattern and you can transform with Power Query) or maintain data in an Excel file, easier to work with and let Power BI use this excel file. The advantage of storing in excel is, if you need to change data or need to add rows, you don't need to open Power BI, just update the Excel file and refresh Power BI to get the data.
Good luck whatever way you decided to go.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- bobliFrequent Visitor
Hi parry2k , thanks a lot for all the explanation. What I am searching for is a way to embed a query's result into a table. The table will be exactly like a table we get from the "Enter Data" button. However, instead of typing them in manually, I want to redirect a query's result into it. The goal here is that some decent amount of data only lives inside the report once I import them in. I guess it is a little hard to do so and it might be against Power BI's philosophy?
- AnonymousNot applicable
Hi bobli ,
You could use Import mode to load data first, then copy the table and paste the table in enter data feature.
Best Regards,
Jay
- bobliFrequent Visitor
Thanks, The copy and paste made it work.