The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!