Forum Discussion
How do I get a single value based on three queries that need to match
Hi,
I have two tables (1 and 2) - I want to match details in Table 1 with Table 2 to get unique value (result)?
There will be many combinations - each with a unique result.
Thanks
Di
Hi DianneB ,
yes that makes sense.
Looks like an (Excel) Lookup. In Power Query you do this with a Merge of the 2 tables:
Go to table 1 and merge table 2 to it on the 3 key-columns like described here: Merge queries (Power Query) (microsoft.com)
or here: Advanced Excel Power Query - Merge Queries with 3 Lookup Columns - YouTube
Then expand the Emission Factor column.
3 Replies
- ImkeF
Community Champion
I don't understand your request. Specifically: What is the logic behind the desired result/unique values
Please read the guidelines on how to get your questions answerd quickly: help how to get your questions answered quickly - Microsoft Power BI Community
- DianneBFrequent Visitor
Hi and thanks for your comment - let me try and explain a bit further and this time I will use the actual data query.
What my ultimate aim is to find the applicable emission factor based on three parameters - tank type, fuel type and weather zone. The emission factor will vary depending on these three parameters.
On one table, I have site details which will list the three parameters and on another table I have the emission factors listed for each combination possible for these three parameters. A site can have only one weather zone but can have multiple tank types and fuel types.
I have highlighted below what the result should be for a few examples. Does this make more sense? There are many more tank types and fuel types that I have not listed, but once I get the logic and formula correct (with your help if possible), I can accordingly adjust.
- ImkeF
Community Champion
Hi DianneB ,
yes that makes sense.
Looks like an (Excel) Lookup. In Power Query you do this with a Merge of the 2 tables:
Go to table 1 and merge table 2 to it on the 3 key-columns like described here: Merge queries (Power Query) (microsoft.com)
or here: Advanced Excel Power Query - Merge Queries with 3 Lookup Columns - YouTube
Then expand the Emission Factor column.