Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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êsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
102 | |
78 | |
77 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |