Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
craig811
Helper III
Helper III

Help with custom column

Hi,

 

How can I create a custom column to take at value from my other table in power query:

 

I am using the below but does not work:

Exchange_Rates[Exchange Rate],FILTER(Exchange_Rates, Combined_for_GL_Check[Entered Currency]= Exchange_Rates[Currency]

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @craig811 ,

 

We can create a custom column and expand it to meet your requirement:

 

let c = [Entered Currency]
in Table.SelectRows(Exchange_Rates,each [Currency] = 
c)

 

3.jpg4.jpg5.jpg

 

All the queries are here:

Exchange_Rates:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUbJUitWJVnICsgwNwExnENMQzHQBMs3BLFcgy1gpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Currency = _t, #"Exchange Rate" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Currency", type text}, {"Exchange Rate", Int64.Type}})
in
    #"Changed Type"

 

Combined_for_GL_Check:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Entered Currency" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Entered Currency", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Rate", each let c = [Entered Currency]
in Table.SelectRows(Exchange_Rates,each [Currency] = 
c)),
    #"Expanded Rate" = Table.ExpandTableColumn(#"Added Custom", "Rate", {"Exchange Rate"}, {"Rate.Exchange Rate"})
in
    #"Expanded Rate"

 

 

Or we can create a calculated column to meet your requirement:

 

Rate_Dax = LOOKUPVALUE('Exchange_Rates'[Exchange Rate],'Exchange_Rates'[Currency],[Entered Currency])

 

6.jpg

 
Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hi @craig811 ,

 

We can create a custom column and expand it to meet your requirement:

 

let c = [Entered Currency]
in Table.SelectRows(Exchange_Rates,each [Currency] = 
c)

 

3.jpg4.jpg5.jpg

 

All the queries are here:

Exchange_Rates:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUbJUitWJVnICsgwNwExnENMQzHQBMs3BLFcgy1gpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Currency = _t, #"Exchange Rate" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Currency", type text}, {"Exchange Rate", Int64.Type}})
in
    #"Changed Type"

 

Combined_for_GL_Check:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Entered Currency" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Entered Currency", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Rate", each let c = [Entered Currency]
in Table.SelectRows(Exchange_Rates,each [Currency] = 
c)),
    #"Expanded Rate" = Table.ExpandTableColumn(#"Added Custom", "Rate", {"Exchange Rate"}, {"Rate.Exchange Rate"})
in
    #"Expanded Rate"

 

 

Or we can create a calculated column to meet your requirement:

 

Rate_Dax = LOOKUPVALUE('Exchange_Rates'[Exchange Rate],'Exchange_Rates'[Currency],[Entered Currency])

 

6.jpg

 
Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Great thank you

Greg_Deckler
Community Champion
Community Champion

If you absolutely have to have it in Power Query, @ImkeF might have a solution.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
az38
Community Champion
Community Champion

hi @craig811 

you are trying to do it in Power Query Editor, but as you have so simple statement it should be enough to create relationships between Combined_for_GL_Check[Entered Currency] and Exchange_Rates[Currency] fields (if it has 1-to-1 or manyt-to-one connections).

you will bw able to add this value in other places of your report without additionalcoding


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors