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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors