<?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: DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3912562#M152336</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="720182" data-lia-user-login="lucasvaranda" class="lia-mention lia-mention-user"&gt;lucasvaranda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I create a measure and here is the DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SalePriceDifference = 
VAR _CurrentRowDate =
    MAX ( 'Table'[Date] )
VAR _PreviousRowDate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] &amp;lt; _CurrentRowDate )
    )
RETURN
    IF (
        _PreviousRowDate &amp;lt;&amp;gt; BLANK (),
        SUM ( 'Table'[Sale price] )
            - CALCULATE (
                SUM ( 'Table'[Sale price] ),
                FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _PreviousRowDate )
            )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;In Power BI Desktop, the card can only show one value, it doesn't show the values all together like a bar chart. It only show you the Total.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 03:18:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-13T03:18:00Z</dc:date>
    <item>
      <title>DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3906159#M152169</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone, I'm having a problem viewing my measurement on the card, which compares the current day to the previous day in percentages. I can see it normally on the graph and I can't see it on the card.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;1: % preço =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;([Preço de venda](&lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt;(Calendario[Data]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date], -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, DAY)))&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2: var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;% preço =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;([Preço de venda] - [% preço], [% preço])&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3: teste03 =&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[var % preço]&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;" ⬆ 0%; ⬇ 0%"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 17:06:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3906159#M152169</guid>
      <dc:creator>lucasvaranda</dc:creator>
      <dc:date>2024-05-09T17:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3906340#M152176</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="720182" data-lia-user-login="lucasvaranda" class="lia-mention lia-mention-user"&gt;lucasvaranda&lt;/a&gt;&amp;nbsp;See my article on Mean Time Between Failure (MTBF) which uses EARLIER: &lt;A href="http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586" target="_blank"&gt;http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586&lt;/A&gt;.&lt;BR /&gt;The basic pattern is:&lt;BR /&gt;Column =&amp;nbsp;&lt;BR /&gt;&amp;nbsp; VAR __Current = [Value]&lt;BR /&gt;&amp;nbsp; VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] &amp;lt; EARLIER('Table'[Date])),[Date])&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp;( __Current - __Previous ) * 1.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 19:06:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3906340#M152176</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-05-09T19:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3912562#M152336</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="720182" data-lia-user-login="lucasvaranda" class="lia-mention lia-mention-user"&gt;lucasvaranda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I create a measure and here is the DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SalePriceDifference = 
VAR _CurrentRowDate =
    MAX ( 'Table'[Date] )
VAR _PreviousRowDate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] &amp;lt; _CurrentRowDate )
    )
RETURN
    IF (
        _PreviousRowDate &amp;lt;&amp;gt; BLANK (),
        SUM ( 'Table'[Sale price] )
            - CALCULATE (
                SUM ( 'Table'[Sale price] ),
                FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _PreviousRowDate )
            )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;In Power BI Desktop, the card can only show one value, it doesn't show the values all together like a bar chart. It only show you the Total.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 03:18:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX/m-p/3912562#M152336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-13T03:18:00Z</dc:date>
    </item>
  </channel>
</rss>

