March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
trying to compare the multiple columns to find item available and item not avaialbe
Itemcode Reference Bom Itemcode Bom Description
1011 FZ FZ TearTap
1022 GH GH Printed
1033 KL item not required - BOM
1044 VB Bundlepaer
1055 CB CB Case lable
i am trying to compare if both reference bom and Itemcode bom values are same its return Item Available .
If refernce bom and itemcode bom values are not match its return Item not available .'
another condition if refence bom and itemcode bom values not match or blank same time description column if word contain item not required its return No issues.
Expected output :
Itemcode Reference Bom Itemcode Bom Description Status
1011 FZ FZ TearTap Item available
1022 GH GH Printed Item available
1033 KL item not required - BOM No issues
1044 VB Bundlepaer Item Not available
1055 CB CB Case lable Item available .
Looking for support .thanks in advance .
Solved! Go to Solution.
hi @THENNA_41 try it colum
Status =
SWITCH(
TRUE(),
[Reference Bom] = [Itemcode Bom], "Item available",
AND( [Itemcode Bom] = BLANK(), [Description] = "item not required - BOM"), "No issues",
AND( [Reference Bom] <> BLANK(), [Itemcode Bom] = BLANK()), "Item Not available")
hi @THENNA_41 try it colum
Status =
SWITCH(
TRUE(),
[Reference Bom] = [Itemcode Bom], "Item available",
AND( [Itemcode Bom] = BLANK(), [Description] = "item not required - BOM"), "No issues",
AND( [Reference Bom] <> BLANK(), [Itemcode Bom] = BLANK()), "Item Not available")
Hi @THENNA_41
This is best done in Power Query. Place the following M code in a blank query to see the steps.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwNFTSUXKLghEhqYlFIYkFSrE6IEkjI6CQuweMCCjKzCtJTYFKGhsDhbx9gAQQZZak5irk5ZcoFKUWlmYWpaYo6Co4+ftClZqYAJWEOUGUOpXmpeSkFiSmFkFlTU2Bos5OcCKxOFUhJzEpJ1UpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Itemcode = _t, #"Reference Bom" = _t, #"Itemcode Bom" = _t, Description = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Itemcode", Int64.Type}, {"Reference Bom", type text}, {"Itemcode Bom", type text}, {"Description", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Status", each if [Reference Bom] = [Itemcode Bom] then "Item available" else if Text.Contains(Text.Upper([Description]), Text.Upper("item not required")) then "No issues" else "Item not available", type text)
in
#"Added Custom"
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hi,
Here is one way to do this:
Edit:
If you want to check for blank in the first case you can modify the dax like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |