Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi
I am trying to identify on my report, using PowerQuery, if a purchadse order number; the column is declared as a text value, had/is all nuermic values. A number of Purchase orders numbers are prefixed with a letter(s). I wanted to flag these as they are a different type of order.
I am using a couple of snippets taken from the web and came up with this:
=if
List.AllTrue({
Text.Length([PurchaseOrder])=7,
Value.Is(
Number.From([PurchaseOrder])
)
})
then "YES"
else "NO"
So I am checking if a purchase order text lenght = 7 chatacters, then I want to check if they are all nuermic. Its seems to partially work, ie its understands if it is all numeric, its just when it encounters a text character if fails and throughs up an error for thoses rows.
I asusmed adding this to an IF statement the outcomes would be false and I get my answer.
Chris.
Solved! Go to Solution.
One way to do it is to add a custom column with this formula, which will return True for number rows and False for ones with letters.
=Value.Is(Value.FromText([Column1]), type number)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
One way to do it is to add a custom column with this formula, which will return True for number rows and False for ones with letters.
=Value.Is(Value.FromText([Column1]), type number)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
PAt
So simple when you know how, that sgreta thanks.
Are you able to tell me the difference between 'type number' and 'Number.Type'
Chris
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.