<?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: How to insert difference between two values in visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354907#M10569</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue with summarize function. I couldn't add measure 3 in new table.&amp;nbsp;When I use same function to create columninstead of measure, it gives me different results. What can be wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2018 05:36:41 GMT</pubDate>
    <dc:creator>ysapiyev</dc:creator>
    <dc:date>2018-02-09T05:36:41Z</dc:date>
    <item>
      <title>How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354686#M10555</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building visual, which will display difference between two latest values. I have set of data, according to dates. I created measure, which calculates difference between two latest values:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CALCULATE (
    SUM ( 'VT_WELL_TEST_en_US'[value1] );
    FILTER (
        'Table1';
        'Table1'[date]
            = CALCULATE (
                MAX ( 'Table1'[date] );
                FILTER ( Table1; 'Table1'[item_name] = EARLIER ( 'Table1'[item_name] ) )
            )  
    ) 
) - CALCULATE ( SUM ( 'Table1'[value1] );
    FILTER (
        'Table1';
        'Table1'[date]
            = CALCULATE (
                MAX ( 'Table1'[date] );
                FILTER ( Table1; 'Table1'[date]&amp;lt;&amp;gt;MAX('Table1'[date])                )
            )
    )
)&lt;/PRE&gt;&lt;P&gt;However, when I insert this measure in visual, it displays me just values for latest date, not difference. What can be one, to display difference?&lt;/P&gt;&lt;P&gt;Also, I group values in visual, since they have to differ according to date.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:34:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354686#M10555</guid>
      <dc:creator>ysapiyev</dc:creator>
      <dc:date>2018-02-08T13:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354696#M10556</link>
      <description>&lt;P&gt;Tough to say exactly what is going on here. What I would do would be to break this into 3 measures. like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Measure1 = CALCULATE (
    SUM ( 'VT_WELL_TEST_en_US'[value1] );
    FILTER (
        'Table1';
        'Table1'[date]
            = CALCULATE (
                MAX ( 'Table1'[date] );
                FILTER ( Table1; 'Table1'[item_name] = EARLIER ( 'Table1'[item_name] ) )
            )  
    ) 
)

Measure2 = CALCULATE ( SUM ( 'Table1'[value1] );
    FILTER (
        'Table1';
        'Table1'[date]
            = CALCULATE (
                MAX ( 'Table1'[date] );
                FILTER ( Table1; 'Table1'[date]&amp;lt;&amp;gt;MAX('Table1'[date])                )
            )
    )
)

Measure3 = Measure1 - Measure2&lt;/PRE&gt;&lt;P&gt;Should be easier to troubleshoot that way and ensure that your values are coming back correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:00:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354696#M10556</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-02-08T14:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354863#M10565</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this approach. However, it transfers not difference, but latest value. I guess it happens because inputs for my visual grouped by date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To clarify my structure. I have 4 inputs, one of them should be difference between two values. These inputs are grouped by date and item name. And when I group it by date, measure3, which should give me difference, gives me latest value, instead of difference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 17:51:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354863#M10565</guid>
      <dc:creator>ysapiyev</dc:creator>
      <dc:date>2018-02-08T17:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354877#M10566</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I create another table which will contain item name, latest date for this item and difference between values using DAX code?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 17:57:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354877#M10566</guid>
      <dc:creator>ysapiyev</dc:creator>
      <dc:date>2018-02-08T17:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354892#M10568</link>
      <description>&lt;P&gt;Sure, you would typically use SUMMARIZE or ADDCOLUMNS. You can do this within a measure or in Modeling tab click "New Table".&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:04:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354892#M10568</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-02-08T18:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354907#M10569</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue with summarize function. I couldn't add measure 3 in new table.&amp;nbsp;When I use same function to create columninstead of measure, it gives me different results. What can be wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 05:36:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/354907#M10569</guid>
      <dc:creator>ysapiyev</dc:creator>
      <dc:date>2018-02-09T05:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/355151#M10573</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got question regarding measures. When I calculate measure 3, as it was shown above, and when I insert it to table visual with item name, date, measure 3 demonstrates same values as value1, when it should demonstrate difference. So, how to alter DAX code to have dependence from date and name?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 06:01:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/355151#M10573</guid>
      <dc:creator>ysapiyev</dc:creator>
      <dc:date>2018-02-09T06:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert difference between two values in visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/357931#M10654</link>
      <description>&lt;P&gt;It worked, when I added measures to new table and made data link between original table and new one.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 09:09:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-insert-difference-between-two-values-in-visual/m-p/357931#M10654</guid>
      <dc:creator>ysapiyev</dc:creator>
      <dc:date>2018-02-14T09:09:39Z</dc:date>
    </item>
  </channel>
</rss>

