Forum Discussion

rraja2k2's avatar
rraja2k2
Regular Visitor
3 years ago
Solved

Merge Vs List function for my scenario where I need to map a value from another query

Hi Experts, I have 2 table queries in Power BI editor. Query1 has many columns including below columns (data refreshed from SAP HANA DB) Owner_id Comp_code Creation_date KANR 1001 02/03/...
  • rubayatyasmin's avatar
    3 years ago

    Hi, rraja2k2 

    The goal of your problem is to assign a value from Query2's "BU" column to Query1 based on certain conditions. You have correctly identified two approaches:

    1. Using Power Query's built-in merge queries functionality
    2. Using Power Query M functions, specifically list functions

    In terms of performance, neither approach is necessarily optimal for very large datasets, as both involve row-by-row operations. Power Query is best for transforming medium-sized datasets, while a database-level operation would be more efficient for large datasets. It may be worth considering moving this operation to the source system (SAP HANA DB) if possible, as databases are designed for handling this kind of large-scale operations more efficiently than Power BI.

    If you find performance degrades with either approach, it may be helpful to simplify the model or reduce the amount of data being processed.