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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors