Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hi all.
I have a requirement wherein I want to convert DAX logic into M query.
Below is the DAX query which I am looking to convert.
Solved! Go to Solution.
Hi @amitchandak @V-lianl-msft thanks for your suggestions.
Those suggestions did help somewhat but not totally.
I implemented the following steps to arrive at the output;
1)Go to Query EDditor, duplicate the original table. Go to 'Choose Columns' and select columns which you want to use as a KEY to lookup. In my case they were 'Tab' and 'TabIndex'.
2) Again Duplicate the original table and filter ParentTab for non-zero values.
Merge this table with the Lookup table on 'Tab' from current table and 'ParentTab' from Lookup table.
3)Select TabIndex from the expanded tab.
4)Again duplicate the original table and filter 'ParentTab' for "00000000-0000-0000-0000-000000000000".
5)Append both the tables.
Hi @amitchandak @V-lianl-msft thanks for your suggestions.
Those suggestions did help somewhat but not totally.
I implemented the following steps to arrive at the output;
1)Go to Query EDditor, duplicate the original table. Go to 'Choose Columns' and select columns which you want to use as a KEY to lookup. In my case they were 'Tab' and 'TabIndex'.
2) Again Duplicate the original table and filter ParentTab for non-zero values.
Merge this table with the Lookup table on 'Tab' from current table and 'ParentTab' from Lookup table.
3)Select TabIndex from the expanded tab.
4)Again duplicate the original table and filter 'ParentTab' for "00000000-0000-0000-0000-000000000000".
5)Append both the tables.
Hi @Anonymous ,
1. Create a merged column in power query:
2. Create a merge query in the same table:
Expand the index column in the table to get the desired results.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , seem like you need lookup in power query,
refer if these can help
https://www.youtube.com/watch?v=3mgCXA7DD3U
https://www.myonlinetraininghub.com/vlookup-in-power-query-using-list-functions
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 21 | |
| 19 |
| User | Count |
|---|---|
| 41 | |
| 32 | |
| 18 | |
| 18 | |
| 15 |