Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RamenAnalytics
New Member

Trying to manage OS versions (cannot convert to Numbers)

Hello all,

I am trying to manage iOS versions within PowerBI - These numbers have two decimals within them "17.5.0" i believe this fact is causing some discrepancies when attempting to convert them to numbers. 

RamenAnalytics_0-1728349728305.png

As seen here:

RamenAnalytics_1-1728349838516.png

Is there anyway to convert these versions into number, so i can start comparing with previous versions / versions avaliable / higher and lower visuals. Thanks for all your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @RamenAnalytics ,

 

Pls has your problem been solved? If so, accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

I reviewed it and I tried to reproduce it. I found that in excel, like "17.5.0" could be set up as number type.

vstephenmsft_0-1730186025446.png

I think you want to do the same as in Power BI Desktop, right?

However, you can't do this way in Desktop as it is by default.

vstephenmsft_1-1730186270335.png

After testing, the text format "xx.x.x" can also be compared in size. As follows, the results of comparing the size are normal. I added a custom column that returns 1 if [device_os_version] is larger than [device_os_version2], otherwise it returns 0.

vstephenmsft_2-1730187129811.png

vstephenmsft_3-1730187141578.png

Hope this helps.

 

Best Regards,

Stephen Tao

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @RamenAnalytics ,

 

Pls has your problem been solved? If so, accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

I reviewed it and I tried to reproduce it. I found that in excel, like "17.5.0" could be set up as number type.

vstephenmsft_0-1730186025446.png

I think you want to do the same as in Power BI Desktop, right?

However, you can't do this way in Desktop as it is by default.

vstephenmsft_1-1730186270335.png

After testing, the text format "xx.x.x" can also be compared in size. As follows, the results of comparing the size are normal. I added a custom column that returns 1 if [device_os_version] is larger than [device_os_version2], otherwise it returns 0.

vstephenmsft_2-1730187129811.png

vstephenmsft_3-1730187141578.png

Hope this helps.

 

Best Regards,

Stephen Tao

 

danextian
Super User
Super User

Hi @RamenAnalytics 
How many digits can there be after a decimal point? For example can 17.6.0 go to 17.66.01? Also, what do yo mean by higher and lower visuals?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Kedar_Pande
Super User
Super User

You can create a new column with a DAX formula that removes decimals:

WholeNumber = INT(SUBSTITUTE('Table'[YourColumn], ".", ""))

For example, "17.5.0" would become "1750".

If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande

Ritaf1983
Super User
Super User

Hi @RamenAnalytics 

Hi there!

The version numbers like "17.5.0" are causing issues because of the multiple decimal points. Here are a couple of ways you could convert them to numbers for comparison:

1. **Remove Dots**: You can simply replace the dots with nothing to create a continuous numeric value. For example, in Power Query, you can do this:

```M
let
Source = ...,
ReplacedDots = Text.Replace([Version], ".", ""),
VersionNumber = Number.FromText(ReplacedDots)
in
VersionNumber
```

This will convert "17.5.0" into "1750", which makes it easier to compare versions as numbers.

2. **Convert to a Decimal Format**: Another option is to convert each part of the version number into a numeric representation, combining them into a decimal value:

```M
let
Source = ...,

SplitVersion = Text.Split([Version], "."),
Major = Number.FromText(SplitVersion{0}),
Minor = Number.FromText(SplitVersion{1}),
Patch = Number.FromText(SplitVersion{2}),
Combined = Major + Minor / 10 + Patch / 100
in
Combined
```

This way, "17.5.0" would become something like "17.50", retaining the meaning of the individual parts.

Either of these approaches should help you compare the versions without the discrepancies caused by the dots.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.