<?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 Re: Dynamic Measure Formatting Negative Values with Parentheses Instead of (-) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348954#M172728</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354683" data-lia-user-login="swolfe2" class="lia-mention lia-mention-user"&gt;swolfe2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR CurrentValue = SELECTEDMEASURE()
VAR AbsValue = ABS ( CurrentValue )
RETURN
    IF (
        AbsValue &amp;gt;= 1000000,
        "$#,0,,. M;($#,0,,.) M",
        "$#,##0;($#,##0)"
    )&lt;/LI-CODE&gt;
&lt;P&gt;This makes use of the "&amp;lt;positive format&amp;gt;;&amp;lt;negative format&amp;gt;" structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2025 21:53:00 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2025-01-02T21:53:00Z</dc:date>
    <item>
      <title>Dynamic Measure Formatting Negative Values with Parentheses Instead of (-)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348938#M172727</link>
      <description>&lt;P&gt;I am attempting to do some dynamic measure formatting on a DAX measure. However, I'm having difficulty getting negative values to display with parentheses instead of the negative symbol.&lt;BR /&gt;&lt;BR /&gt;For example, if I have a value of -132,500,000, I want to display it as ($132) M.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The dynamic measure formatting is working great for positive numbers, I'm just unsure how to get it to display correctly with negative values.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR CurrentValue = SELECTEDMEASURE()
RETURN
    SWITCH (
        TRUE(),
        CurrentValue &amp;lt;= -1000000, "($#,0,,.) M",
        CurrentValue &amp;gt; -1000000 &amp;amp;&amp;amp; CurrentValue &amp;lt; 0, "($#,##0)",
        CurrentValue &amp;gt;= 0 &amp;amp;&amp;amp; CurrentValue &amp;lt; 1000000, "$#,##0",
        CurrentValue &amp;gt;= 1000000, "$#,0,,. M"
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 21:30:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348938#M172727</guid>
      <dc:creator>swolfe2</dc:creator>
      <dc:date>2025-01-02T21:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Measure Formatting Negative Values with Parentheses Instead of (-)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348954#M172728</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354683" data-lia-user-login="swolfe2" class="lia-mention lia-mention-user"&gt;swolfe2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR CurrentValue = SELECTEDMEASURE()
VAR AbsValue = ABS ( CurrentValue )
RETURN
    IF (
        AbsValue &amp;gt;= 1000000,
        "$#,0,,. M;($#,0,,.) M",
        "$#,##0;($#,##0)"
    )&lt;/LI-CODE&gt;
&lt;P&gt;This makes use of the "&amp;lt;positive format&amp;gt;;&amp;lt;negative format&amp;gt;" structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 21:53:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348954#M172728</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-01-02T21:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Measure Formatting Negative Values with Parentheses Instead of (-)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348961#M172729</link>
      <description>&lt;P&gt;Worked perfectly, and is an elegant solution. Thanks so much!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 22:02:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Measure-Formatting-Negative-Values-with-Parentheses/m-p/4348961#M172729</guid>
      <dc:creator>swolfe2</dc:creator>
      <dc:date>2025-01-02T22:02:45Z</dc:date>
    </item>
  </channel>
</rss>

