Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi
I am fairly new to M Query and need some help with the following:
I have two Queries. Query1 and Query 2. Both have unique values. I need the column in Query 2 to be added to Query 1 for each row in Query2. It is better explained as per below:
Final Outcome:
Any tips or tricks and guidance will be highly appreciated.
THANKS!
SJ
Solved! Go to Solution.
Hi,
To perform the cross join, firstly, you will need to add a custom column in both the table and give a value as = 1
Then do a left join from query 1 to query 2 on Custom column. Lastly, you will need to expand the column.
If you need any other help, let me know.
Proud to be a Super User! | |
Hi @SJ_PPM_BI ,
there are acouple of steps that you will need to follow.
1. for query 2 first I transpose the data. you will get the result as depicted below.
2. append the query.
3. Using fill option fill down on the columns for query 2
4. use unpivot other column option on column Project name.
5. Filter out the null values from project name and detlete the column attribute.
If this works pleae mark it as a soltuion.
Thanks.
Thank you very much!
So simple. I was looking at all sorts of things such as Table Combine etc. Most searches seems to guide towards using a "sledge hammer" for what I needed. 🙂
Many THANKS again!
SJ
Hi,
To perform the cross join, firstly, you will need to add a custom column in both the table and give a value as = 1
Then do a left join from query 1 to query 2 on Custom column. Lastly, you will need to expand the column.
If you need any other help, let me know.
Proud to be a Super User! | |
This worked perfectly! Thank you so much!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |