Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
(If this gets deleted again, can someone message me why? External links? Too many edits?)
I have a column of data containing 2 decimals per value:
Software | Major.Minor.Build |
Soft1 | 23.45.6780 |
Soft2 | 1.2.56441 |
Soft3 | 12.3.8210 |
Soft4 | 1.0.0000 |
Because there's 2 decimals per value, I can't run DAX logic on them as if they're numbers (which are limited to 1 decimal). So, I had the idea of separating each part of the 2-decimal values into substrings.
For example, 23.455.6780 would be separated into 3 substrings/variables:
Orig = "23.455.6780"
Major = "23"
Minor = "455"
Build = "6780"
Then, I'd like to make sure each of those numbers are high enough.
Psuedo code of a new column that returns "Good!" or "Bad" depending on if the software version number is in compliance:
SoftwareCompliance = VAR Orig = SELECTEDVALUE('Software Packages'[Major.Minor.Build]) // Ex. "23.455.6780" <--The amount of numbers between each decimal can change VAR Major = "23" //I need to extract this from `Orig` programmatically VAR Minor = "455" //I need to extract this from `Orig` programmatically VAR Build = "6780" //I need to extract this from `Orig` programmatically RETURN SWITCH( TRUE(), VALUE(Major) >= 23 && VALUE(Minor) >= 455 && VALUE(Build) >= 6750, "Good!", // If the major, minor, and build #'s are all high enough, the software version is in-compliance. "Bad" // Otherwise, the software version is out-of-compliance. )
Solved! Go to Solution.
Hi @Anonymous
Download this sample PBIX file with the following example
This is really easy to do in Power Query - that's what it's built for
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCs5PKzFU0lEyMtYzMdUzM7cwUIrVgQgbAYUN9Yz0TM1MTAzhosYgUSM9Yz0LI0OEWhOwWgM9AyBQio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Software = _t, Major.Minor.Build = _t]),
#"Split Column by Delimiter" = Table.SplitColumn(Source, "Major.Minor.Build", Splitter.SplitTextByDelimiter(".", QuoteStyle.Csv), {"Major.Minor.Build.1", "Major.Minor.Build.2", "Major.Minor.Build.3"}),
#"Renamed Columns" = Table.RenameColumns(#"Split Column by Delimiter",{{"Major.Minor.Build.1", "Major"}, {"Major.Minor.Build.2", "Minor"}, {"Major.Minor.Build.3", "Build"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Major", Int64.Type}, {"Minor", Int64.Type}, {"Build", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Software Compliance", each if [Major] >= 23 and [Minor] >= 455 and [Build] >= 6750 then "Good" else "Bad")
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
Hi @Anonymous
Download this sample PBIX file with the following example
This is really easy to do in Power Query - that's what it's built for
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCs5PKzFU0lEyMtYzMdUzM7cwUIrVgQgbAYUN9Yz0TM1MTAzhosYgUSM9Yz0LI0OEWhOwWgM9AyBQio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Software = _t, Major.Minor.Build = _t]),
#"Split Column by Delimiter" = Table.SplitColumn(Source, "Major.Minor.Build", Splitter.SplitTextByDelimiter(".", QuoteStyle.Csv), {"Major.Minor.Build.1", "Major.Minor.Build.2", "Major.Minor.Build.3"}),
#"Renamed Columns" = Table.RenameColumns(#"Split Column by Delimiter",{{"Major.Minor.Build.1", "Major"}, {"Major.Minor.Build.2", "Minor"}, {"Major.Minor.Build.3", "Build"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Major", Int64.Type}, {"Minor", Int64.Type}, {"Build", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Software Compliance", each if [Major] >= 23 and [Minor] >= 455 and [Build] >= 6750 then "Good" else "Bad")
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
42 | |
30 | |
27 | |
27 |