<?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 Measure to Calculate the value from a specific column depending on the temperature Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3773507#M147452</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="509602" data-lia-user-login="Ibrahim_shaik" class="lia-mention lia-mention-user"&gt;Ibrahim_shaik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the information you provided, I have created a sample data to solve your problem and you can follow the steps below:&lt;BR /&gt;1. Add an index column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. Add a calculated column that calculates the difference in time.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;hour = 
VAR _index = 'Table'[Index]
VAR _1 =
    CALCULATE (
        MAX ( 'Table'[Time] ),
        FILTER ( 'Table', 'Table'[Index] = _index - 1 )
    )
VAR _hour =
    DATEDIFF ( 'Table'[Time], _1, HOUR )
RETURN
    _hour
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;3. Add a measure that calculates the loss when the time is one hour apart.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;hour Consumption = 
CALCULATE (
    SUM ( 'Table'[consumption] ),
    FILTER ( 'Table', 'Table'[hour] = -1 )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 06:14:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-19T06:14:11Z</dc:date>
    <item>
      <title>Dax Measure to Calculate the value from a specific column depending on the temperature Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3757786#M146607</link>
      <description>&lt;P&gt;Hi Power BI Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Table in which there are three columns with the consumption values and a temperature column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the consumption depending on the temperature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: In two hour 11 AM to 1 PM consumption the temperature from 11 AM to 12 PM might be below 35 degree and from 12 PM to 1 PM it might be above 40 degree.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I want to calculate the consumption depending on temp for the Selected time period may be 1 hour or 2 hour, 1 day, one week, month, year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give a Solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;Ibrahim.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 11:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3757786#M146607</guid>
      <dc:creator>Ibrahim_shaik</dc:creator>
      <dc:date>2024-03-12T11:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to Calculate the value from a specific column depending on the temperature Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3758894#M146647</link>
      <description>&lt;P&gt;You would usually use a scatter plot for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 20:35:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3758894#M146647</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-12T20:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to Calculate the value from a specific column depending on the temperature Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3773507#M147452</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="509602" data-lia-user-login="Ibrahim_shaik" class="lia-mention lia-mention-user"&gt;Ibrahim_shaik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the information you provided, I have created a sample data to solve your problem and you can follow the steps below:&lt;BR /&gt;1. Add an index column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. Add a calculated column that calculates the difference in time.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;hour = 
VAR _index = 'Table'[Index]
VAR _1 =
    CALCULATE (
        MAX ( 'Table'[Time] ),
        FILTER ( 'Table', 'Table'[Index] = _index - 1 )
    )
VAR _hour =
    DATEDIFF ( 'Table'[Time], _1, HOUR )
RETURN
    _hour
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;3. Add a measure that calculates the loss when the time is one hour apart.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;hour Consumption = 
CALCULATE (
    SUM ( 'Table'[consumption] ),
    FILTER ( 'Table', 'Table'[hour] = -1 )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 06:14:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-Calculate-the-value-from-a-specific-column/m-p/3773507#M147452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-19T06:14:11Z</dc:date>
    </item>
  </channel>
</rss>

