Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
is it possible to bring this formula for a Calculated column directly into Power Query.
thanks in advance
Solved! Go to Solution.
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
Proud to be a Datanaut!
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:
Pete
Proud to be a Datanaut!
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
Proud to be a Datanaut!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |