<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ARABIC in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/ARABIC/m-p/1083214#M519</link>
    <description>&lt;P&gt;&lt;A title="" href="https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991" target="_self"&gt;In my recent quest to create or catalog as many DAX equivalents for Excel functions&lt;/A&gt; , ARABIC converts numbers written in the Roman numeral system to numbers written in the Arabic numeral system, just in case you have to convert that EBCIDIC encoded mainframe data from those COBOL programs that store 2-digit years written as Roman numerals...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ARABIC = 
    VAR __Roman = MAX([ROMAN])
    VAR __Classic = 
        DATATABLE(
            "Arabic",INTEGER,
            "Roman",STRING,
            {
                { 1, "I" },
                { 4, "IV" },
                { 5, "V" },
                { 9, "IX" },
                { 10, "X" },
                { 40, "XL" },
                { 50, "L" },
                { 90, "XC" },
                { 100, "C" },
                { 400, "CD" },
                { 500, "D" },
                { 900, "CM" },
                { 1000, "M" }
            }
        )
    VAR __Convert = __Classic
    VAR __Table =
        ADDCOLUMNS(
            ADDCOLUMNS(
                GENERATESERIES(1,LEN(__Roman),1),
                "__Previous",[Value] - 1,
                "__Next",[Value] + 1,
                "__Roman",MID(__Roman,[Value],1)
            ),
            "__Arabic",MAXX(FILTER(__Convert,[Roman] = [__Roman]),[Arabic])
        )
    VAR __Table1 = 
        ADDCOLUMNS(
            ADDCOLUMNS(
                ADDCOLUMNS(
                    __Table,
                    "__PreviousRoman",MAXX(FILTER(__Table,[Value] = EARLIER([__Previous])),[__Roman]),
                    "__NextRoman",MAXX(FILTER(__Table,[Value] = EARLIER([__Next])),[__Roman])
                ),
                "__PreviousArabic",MAXX(FILTER(__Convert,[Roman] = [__PreviousRoman]),[Arabic]),
                "__NextArabic",MAXX(FILTER(__Convert,[Roman] = [__NextRoman]),[Arabic])
            ),
            "__Final",
                SWITCH(TRUE(),
                    [__NextArabic] &amp;gt; [__Arabic],0,
                    [__PreviousArabic]&amp;lt;[__Arabic],[__Arabic]-[__PreviousArabic],
                    [__Arabic]
                )
        )
RETURN
    SUMX(__Table1,[__Final])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiOTU5NWZmODgtYmM2YS00OWQxLTgyNTEtM2IxZDRlODhiNjllIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 May 2020 03:46:53 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-05-11T03:46:53Z</dc:date>
    <item>
      <title>ARABIC</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/ARABIC/m-p/1083214#M519</link>
      <description>&lt;P&gt;&lt;A title="" href="https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991" target="_self"&gt;In my recent quest to create or catalog as many DAX equivalents for Excel functions&lt;/A&gt; , ARABIC converts numbers written in the Roman numeral system to numbers written in the Arabic numeral system, just in case you have to convert that EBCIDIC encoded mainframe data from those COBOL programs that store 2-digit years written as Roman numerals...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ARABIC = 
    VAR __Roman = MAX([ROMAN])
    VAR __Classic = 
        DATATABLE(
            "Arabic",INTEGER,
            "Roman",STRING,
            {
                { 1, "I" },
                { 4, "IV" },
                { 5, "V" },
                { 9, "IX" },
                { 10, "X" },
                { 40, "XL" },
                { 50, "L" },
                { 90, "XC" },
                { 100, "C" },
                { 400, "CD" },
                { 500, "D" },
                { 900, "CM" },
                { 1000, "M" }
            }
        )
    VAR __Convert = __Classic
    VAR __Table =
        ADDCOLUMNS(
            ADDCOLUMNS(
                GENERATESERIES(1,LEN(__Roman),1),
                "__Previous",[Value] - 1,
                "__Next",[Value] + 1,
                "__Roman",MID(__Roman,[Value],1)
            ),
            "__Arabic",MAXX(FILTER(__Convert,[Roman] = [__Roman]),[Arabic])
        )
    VAR __Table1 = 
        ADDCOLUMNS(
            ADDCOLUMNS(
                ADDCOLUMNS(
                    __Table,
                    "__PreviousRoman",MAXX(FILTER(__Table,[Value] = EARLIER([__Previous])),[__Roman]),
                    "__NextRoman",MAXX(FILTER(__Table,[Value] = EARLIER([__Next])),[__Roman])
                ),
                "__PreviousArabic",MAXX(FILTER(__Convert,[Roman] = [__PreviousRoman]),[Arabic]),
                "__NextArabic",MAXX(FILTER(__Convert,[Roman] = [__NextRoman]),[Arabic])
            ),
            "__Final",
                SWITCH(TRUE(),
                    [__NextArabic] &amp;gt; [__Arabic],0,
                    [__PreviousArabic]&amp;lt;[__Arabic],[__Arabic]-[__PreviousArabic],
                    [__Arabic]
                )
        )
RETURN
    SUMX(__Table1,[__Final])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiOTU5NWZmODgtYmM2YS00OWQxLTgyNTEtM2IxZDRlODhiNjllIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 03:46:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/ARABIC/m-p/1083214#M519</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-05-11T03:46:53Z</dc:date>
    </item>
  </channel>
</rss>

