Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have to create a new column(col4), when Col1 cell match's with Col3 cell then Col4 should create and data from Col2 as shown below (Col1 has ref2 and Col3 has Ref2 as there is a match Col4 should Col2 Value 20), Please advise me in this. Thanks in advance.
How can we create in Power BI desktop?
Solved! Go to Solution.
Hi @Jpalji ,
You have 2 options trough the Query editor or in DAX.
DAX:
Col4 = LOOKUPVALUE('Table'[Col2];'Table'[Col1];'Table'[Col3])
Query Editor:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkpNM1TSUTI0MACSQI6RUqxONISho2QEEoQJGAPZpqYQVWYwQRMg39wCSRVIgaUhkoAZkG1iChaIBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", type text}}), #"Merged Queries" = Table.NestedJoin(#"Changed Type", {"Column3"}, #"Changed Type", {"Column1"}, "Changed Type", JoinKind.LeftOuter), #"Expanded Changed Type" = Table.ExpandTableColumn(#"Merged Queries", "Changed Type", {"Column2"}, {"Changed Type.Column2"}) in #"Expanded Changed Type"
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Jpalji ,
You have 2 options trough the Query editor or in DAX.
DAX:
Col4 = LOOKUPVALUE('Table'[Col2];'Table'[Col1];'Table'[Col3])
Query Editor:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkpNM1TSUTI0MACSQI6RUqxONISho2QEEoQJGAPZpqYQVWYwQRMg39wCSRVIgaUhkoAZkG1iChaIBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", type text}}), #"Merged Queries" = Table.NestedJoin(#"Changed Type", {"Column3"}, #"Changed Type", {"Column1"}, "Changed Type", JoinKind.LeftOuter), #"Expanded Changed Type" = Table.ExpandTableColumn(#"Merged Queries", "Changed Type", {"Column2"}, {"Changed Type.Column2"}) in #"Expanded Changed Type"
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Jpalji ,
Are you creating a column or a measure?
This is a column to be created on your table not a measure.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português