• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Power Query M formula language or Formula in Power Query

Status
Not open for further replies.

roykana

Member
Please remember to follow all forum rules: Cross-posting
Dear All Master ,

Please help me so that I do not use excel formulas such as in columns C, D, E, F that I marked yellow and I have a custom column in the power query namely PQ-ITEM NO NEW, PQ-GROUP SUPPLIER FIX, PQ-YEAR, PQ -DESCRIPTION so I want the results to use the power query formula or M language so that the results are the same as columns C, D, E, F I have yellow marking.
The reason I did not use the excel formula is because the record is 200000 lines so when it is refreshed it makes the formula calculation so that it makes it very long. For sheet master items do not need to be unpivoted so that they make many rows.
Please give me the solution.
Thanks You

Kana

Reply
Report
 

Attachments

  • FORMULA IN POWER QUERY.xlsx
    21.7 KB · Views: 4
No need whatsoever for a formula in PQ.
  1. Load both tables MasterData and Items (the names I gave them)
  2. Unpivot the lookup columns in the MasterData table
  3. Merge both tables on "attribute" (result of unpivot) and "item number", this to replace your vlookups
  4. Expand the columns needed
  5. replace null by "No" in the expanded columns
  6. Load to Excel

Since you might have loads of data, it is advised to buffer the lookup table in the final query. See in the M-code advanced editor.
 

Attachments

  • Copy of FORMULA IN POWER QUERY.xlsx
    23.8 KB · Views: 2
No need whatsoever for a formula in PQ.
  1. Load both tables MasterData and Items (the names I gave them)
  2. Unpivot the lookup columns in the MasterData table
  3. Merge both tables on "attribute" (result of unpivot) and "item number", this to replace your vlookups
  4. Expand the columns needed
  5. replace null by "No" in the expanded columns
  6. Load to Excel
Since you might have loads of data, it is advised to buffer the lookup table in the final query. See in the M-code advanced editor.

Can you give me steps with screenshots in the word in the masterdata table and items.

Sorry if I've bothered you .

Thanks You

Roykana
 
No need whatsoever for a formula in PQ.
  1. Load both tables MasterData and Items (the names I gave them)
  2. Unpivot the lookup columns in the MasterData table
  3. Merge both tables on "attribute" (result of unpivot) and "item number", this to replace your vlookups
  4. Expand the columns needed
  5. replace null by "No" in the expanded columns
  6. Load to Excel
Since you might have loads of data, it is advised to buffer the lookup table in the final query. See in the M-code advanced editor.
thank you very much

what buffer table can be used in the data source and for what purpose?
 
roykana
Seems that You skip Forum Rules for some reason.
Okay, I test this way ...
Open Conversation with me, if You would like to continue with this thread here.
Now, this thread is Closed.
 
Status
Not open for further replies.
Back
Top