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
Anonymous
Not applicable

Transfer calculated column into power query

Hello,
is it possible to bring this formula for a Calculated column directly into Power Query.

Daniel28DH_0-1670847401647.png

thanks in advance

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

I think it would be something like this in a new custom column:

if List.Contains(List.Buffer(previousStepName[Komponente]), [TopMaterial])
then null else "TopTopMat"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi Pete,

thanks for your support. Unfortunately this approach does not work. I get an error message. Probably because it is expected to return a single value, but the formula refers to the entire column. Do u have any other ideas?

 

What error do you get? This should work ok I think.

 

-----------------------------------------------------------------------------------------

*EDIT* Here's a query with this concept working:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUpMVIrViQZRSGwkThKQmZQEYaKwkTjJQGZyMoSJwoZxYgE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [name = _t, list = _t]),
    chgTypes = Table.TransformColumnTypes(Source,{{"name", type text}, {"list", type text}}),
    addCustom = Table.AddColumn(chgTypes, "Custom", each
        if List.Contains(List.Buffer(chgTypes[list]), [name])
        then "MATCH"
        else null
    )
in
    addCustom

 

 

Example query output:

BA_Pete_0-1670943890118.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




BA_Pete
Super User
Super User

Hi @Anonymous ,

 

I think it would be something like this in a new custom column:

if List.Contains(List.Buffer(previousStepName[Komponente]), [TopMaterial])
then null else "TopTopMat"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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