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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
dommyw277
Helper IV
Helper IV

Unique Software name Count

Is there a way of grouping software and ignoring version numbers in power BI?
As an example we have a sheet full of software eg say Visio 2010, Visio 2014 etc but I want to count the total amount of numbers of the software name?

2 ACCEPTED SOLUTIONS
audreygerred
Super User
Super User

Hi! I suggest having your software name as two fields in your dim table, one field for Base name and one for the year, then you can do a distinct count on the name.





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

Proud to be a Super User!





View solution in original post

AmiraBedh
Super User
Super User

Hello !

If you are willing to use PQ you need to create a col to strip digits and common version punctuation then group on it.

let
    s  = Text.From([SoftwareName]),
    s1 = Text.Select(s, {"A".."Z","a".."z"," "}),
    s2 = Text.Trim(Text.Combine(List.Select(Text.Split(s1, " "), each _ <> ""), " "))
in
    s2

and use it in your visuals.

Or if you are using DAX, you need to add a CC that takes everything before the first digit:

Software Base =
VAR s  = 'Software'[SoftwareName]
VAR L  = LEN(s) + 1
VAR pos =
    MINX(
        {
            FIND("0", s, 1, L),
            FIND("1", s, 1, L),
            FIND("2", s, 1, L),
            FIND("3", s, 1, L),
            FIND("4", s, 1, L),
            FIND("5", s, 1, L),
            FIND("6", s, 1, L),
            FIND("7", s, 1, L),
            FIND("8", s, 1, L),
            FIND("9", s, 1, L)
        },
        [Value]
    )
RETURN TRIM( IF(pos = L, s, LEFT(s, pos - 1)) )

Then you create a measure like:

Total Installs = COUNTROWS('Software')
-- or
Unique Devices = DISTINCTCOUNT('Software'[DeviceID])

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

2 REPLIES 2
AmiraBedh
Super User
Super User

Hello !

If you are willing to use PQ you need to create a col to strip digits and common version punctuation then group on it.

let
    s  = Text.From([SoftwareName]),
    s1 = Text.Select(s, {"A".."Z","a".."z"," "}),
    s2 = Text.Trim(Text.Combine(List.Select(Text.Split(s1, " "), each _ <> ""), " "))
in
    s2

and use it in your visuals.

Or if you are using DAX, you need to add a CC that takes everything before the first digit:

Software Base =
VAR s  = 'Software'[SoftwareName]
VAR L  = LEN(s) + 1
VAR pos =
    MINX(
        {
            FIND("0", s, 1, L),
            FIND("1", s, 1, L),
            FIND("2", s, 1, L),
            FIND("3", s, 1, L),
            FIND("4", s, 1, L),
            FIND("5", s, 1, L),
            FIND("6", s, 1, L),
            FIND("7", s, 1, L),
            FIND("8", s, 1, L),
            FIND("9", s, 1, L)
        },
        [Value]
    )
RETURN TRIM( IF(pos = L, s, LEFT(s, pos - 1)) )

Then you create a measure like:

Total Installs = COUNTROWS('Software')
-- or
Unique Devices = DISTINCTCOUNT('Software'[DeviceID])

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
audreygerred
Super User
Super User

Hi! I suggest having your software name as two fields in your dim table, one field for Base name and one for the year, then you can do a distinct count on the name.





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

Proud to be a Super User!





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.