Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Your file has been submitted successfully. We’re processing it now - please check back in a few minutes to view your report.
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