Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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?
Solved! Go to Solution.
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.
Proud to be a Super User! | |
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
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)) )
Total Installs = COUNTROWS('Software')
-- or
Unique Devices = DISTINCTCOUNT('Software'[DeviceID])
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
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)) )
Total Installs = COUNTROWS('Software')
-- or
Unique Devices = DISTINCTCOUNT('Software'[DeviceID])
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.
Proud to be a Super User! | |
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 34 | |
| 33 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 61 | |
| 60 | |
| 39 | |
| 26 | |
| 24 |