Forum Discussion
mateoc15
Advocate II
7 months agoFiltering text with > or <
I have software version information like version 11.0.2 and 11.0.10. If I want to filter to all versions 11.1.0 or later I don't see a good way to filter. Yes, I have broken it into three pieces ma...
- 7 months ago
I think the solution would to use power query to remove the decimal points and possilby store the verison number as a whole number in a column. That way you are just dealing with numbers like, 1110, 1101 and 1102 as the trailing zero shouldn't matter for the comparison you are trying to make.
pcoley
Super User
7 months agomateoc15
you can create a formula in powerquery:
1. paste the next code in the advance editor:
(myText as text) as number =>
let
parts = Text.Split(myText, "."),
numbers = List.Transform(parts, each Number.FromText(_)),
count = List.Count(numbers),
exponents = List.Transform({0..count-1}, each 8 - 2 * _),
products = List.Transform({0..count-1}, each numbers{_} * Number.Power(10, exponents{_})),
result = List.Sum(products)
in
result2. in your table create a new column invokating this function:
with this colum you can compare the codes as integer numbers.
If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.