Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
In my recent quest to create or catalog as many DAX equivalents for Excel functions, was able to use BASE and BIN2DEC as references in order to create DECIMAL:
DECIMAL =
VAR __Text = MAX('Table'[Text])
VAR __Radix = MAX('Table'[Radix])
VAR __Dec2Base =
{
(0, "0"),
(1, "1"),
(2, "2"),
(3, "3"),
(4, "4"),
(5, "5"),
(6, "6"),
(7, "7"),
(8, "8"),
(9, "9"),
(10, "A"),
(11, "B"),
(12, "C"),
(13, "D"),
(14, "E"),
(15, "F"),
(16, "G"),
(17, "H"),
(18, "I"),
(19, "J"),
(20, "K"),
(21, "L"),
(22, "M"),
(23, "N"),
(24, "O"),
(25, "P"),
(26, "Q"),
(27, "R"),
(28, "S"),
(29, "T"),
(30, "U"),
(31, "V"),
(32, "W"),
(33, "X"),
(34, "Y"),
(35, "Z")
}
VAR __Table =
ADDCOLUMNS(
ADDCOLUMNS(
ADDCOLUMNS(
GENERATESERIES(0,LEN(__Text)-1,1),
"Text",MID(__Text,LEN(__Text) - [Value],1)
),
"Text2Decimal",MAXX(FILTER(__Dec2Base,[Value2] = [Text]),[Value1])
),
"Decimal",POWER(__Radix,[Value]) * [Text2Decimal]
)
RETURN
SUMX(__Table,[Decimal])
eyJrIjoiYmZkZjRjN2YtMjVhMC00MzA3LWIzYjctNThkOTg2ZTEyOWMxIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9