Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am trying to calculate
If Part no contains 0 or - or both then print part no to the K-parts column.
Solved! Go to Solution.
@Anonymous
you can also try to create a column
Column =
VAR a=find("0",'Table (2)'[Part No],1,0)
VAR b=find("-",'Table (2)'[Part No],1,0)
return if(a=0&&b=0,"NA",'Table (2)'[Part No])
I am not sure why your last row contains 0, but your expected result is NA.
Proud to be a Super User!
@Anonymous
you can also try to create a column
Column =
VAR a=find("0",'Table (2)'[Part No],1,0)
VAR b=find("-",'Table (2)'[Part No],1,0)
return if(a=0&&b=0,"NA",'Table (2)'[Part No])
I am not sure why your last row contains 0, but your expected result is NA.
Proud to be a Super User!
Your last sample line is inconsistent.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8jY0MjbRNTQ2MTVTitWJVgJxTc3MwWwgy8DSwhsu7u0ZomtmbmoCETEzt7A0MFSKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Part No" = _t]),
#"Added Custom" = Table.AddColumn(Source, "K- parts", each if Text.Contains([Part No],"-") or Text.Contains([Part No],"0") then [Part No] else "NA")
in
#"Added Custom"
Anyway, here's the formula. Power Query is pretty verbatim.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 46 | |
| 31 | |
| 29 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 56 | |
| 38 | |
| 21 | |
| 21 |