March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hey All,
Need help creating dax formula or calculated column to extract product density. Any help is greatly appreciated!
Need to go from left product column to right density group:
Product | Density |
A123 B1234 8Gbit 8 77/999 AE 1 AB | 8Gbit |
A123 B12 4Gbit 16 7/999 ABCDE 1 AB | 4Gbit |
A123 B1 2Gbit 16 77/999 AB 1 AB | 2Gbit |
A123 B12346 512Gbit 8 77/99 ABCDE | 512Gbit |
A123 B123 77/999 ABCDE 1TB | 1TB |
Thanks in advance!
Solved! Go to Solution.
Hi @asalazarjr
Try this code to add a new calculated column:
Column =
VAR _G =
FIND ( "Gbit", [Product],, -1 )
VAR _T =
FIND ( "TB", [Product],, -2 )
RETURN
IF (
_G <> -1,
RIGHT ( LEFT ( 'Table'[Product], _G + 4 ), 6 ),
IF ( _T <> -2, RIGHT ( LEFT ( 'Table'[Product], _T + 1 ), 3 ), "" )
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi @asalazarjr
Try this code to add a new calculated column:
Column =
VAR _G =
FIND ( "Gbit", [Product],, -1 )
VAR _T =
FIND ( "TB", [Product],, -2 )
RETURN
IF (
_G <> -1,
RIGHT ( LEFT ( 'Table'[Product], _G + 4 ), 6 ),
IF ( _T <> -2, RIGHT ( LEFT ( 'Table'[Product], _T + 1 ), 3 ), "" )
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
You can add a custom column with this expression in the query editor. Note that M is case sensitive, so you can add in Text.Upper or Text.Lower to avoid that issue if needed.
= List.Select(Text.Split([Product], " "), each Text.Contains(_, "Gb") or Text.Contains(_, "TB")){0}
Pat
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |