Forum Discussion
Problems with creating some custom columns
- 8 years ago
Try to use this:
1st approver = IF ( 'Table'[Scanned] = "" && 'Table'[Last Approver] = "Basware Matching", "1st pass mactching", BLANK () ) - 8 years ago
Hi KellyLen,
Try this formula:
PO = IF ( 'Table'[Company code] = "FI24" && 'Table'[Purchase Category (ext)] = "Technical Maintenance" && 'Table'[Purchase Sub Category] <> "Logistics" && ( LEFT ( 'Table'[Gift Card/Traffic Type/Job No], 1 ) IN { "F", "P" } || LEFT ( 'Table'[Gift Card/Traffic Type/Job No], 2 ) IN { "BF" } ), "PO", BLANK () )Should give the result below:
Regards,
MFelix
Thanks a lot, this worked! :)
How about the other problem? :)
Best regards,
Kelly
That was the easy question :D:D
Can you supply any mockup of your data?
Regards,
MFelix
- KellyLen8 years agoHelper III
:D
I do not know, how could I share my data with you? I can only share a screenshot of it:
Kelly
- MFelix8 years agoSuper User
Hi KellyLen,
Try this formula:
PO = IF ( 'Table'[Company code] = "FI24" && 'Table'[Purchase Category (ext)] = "Technical Maintenance" && 'Table'[Purchase Sub Category] <> "Logistics" && ( LEFT ( 'Table'[Gift Card/Traffic Type/Job No], 1 ) IN { "F", "P" } || LEFT ( 'Table'[Gift Card/Traffic Type/Job No], 2 ) IN { "BF" } ), "PO", BLANK () )Should give the result below:
Regards,
MFelix
- KellyLen8 years agoHelper III
Thank you very much! It worked.
Now I have another difficulty to combine two columns. I firstly created a conditional column in Query Editor:
Table.AddColumn(#"Replaced Value", "PO/ No PO", each if Text.StartsWith([Document header text], "14F") then "PO" else if Text.EndsWith([Document header text], "JFK") then "PO" else if [Document type] = "YC" then "PO" else if [Document type] = "YO" then "PO" else "No PO")
I would like to get these conditions to your given formula as well so all these would end up in one column as values PO or No PO.
Are you able to help me with this as well? :)
Best regards,
Kelly