This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. 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
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 23 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 25 | |
| 20 | |
| 20 | |
| 20 | |
| 20 |