<?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: Create measure to return value from column when condition met for two other columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177878#M187947</link>
    <description>&lt;P&gt;Use CALCULATE with explicit filters on both County and Date instead of LOOKUPVALUE:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Min Daily Air Temp for Minimum Surface Temperature =
VAR _MinSurf =
    MIN ( 'Soil.Temp'[Soil Surface Temperature (F)] )
VAR _MinSurfDate =
    CALCULATE (
        SELECTEDVALUE ( 'Soil.Temp'[Date] ),
        'Soil.Temp'[Soil Surface Temperature (F)] = _MinSurf
    )
VAR _MinSurfCounty =
    CALCULATE (
        SELECTEDVALUE ( 'Soil.Temp'[County Name only] ),
        'Soil.Temp'[Soil Surface Temperature (F)] = _MinSurf
    )
RETURN
    CALCULATE (
        MIN ( 'NASA Power Weather Data'[MinTempF] ),
        'NASA Power Weather Data'[County Name only] = _MinSurfCounty,
        'NASA Power Weather Data'[Date] = _MinSurfDate
    )&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 05 May 2026 07:12:00 GMT</pubDate>
    <dc:creator>cengizhanarslan</dc:creator>
    <dc:date>2026-05-05T07:12:00Z</dc:date>
    <item>
      <title>Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177549#M187937</link>
      <description>&lt;P&gt;I am new to PowerBI.&lt;/P&gt;&lt;P&gt;I am trying to return the minimum air temperature based upon the date and county that the minimum soil surface temperature is identified thru the VAR function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each county in the 'nasa power weather data' table has a single row of data for each date. So there should be a single value that is returned if I can get the syntax correct to identify the date/county.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure I have tried, but won't return a value for Minimum Air Temp&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&gt;The Report view I am needing to display:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 15:05:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177549#M187937</guid>
      <dc:creator>ck_ky</dc:creator>
      <dc:date>2026-05-04T15:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177597#M187939</link>
      <description>&lt;P&gt;Try this pattern, replacing the column names with your actual ones:&lt;/P&gt;&lt;PRE&gt;Air Temp at Min Soil =
VAR MinSoil = MIN('nasa power weather data'[Soil Surface Temp])
RETURN
CALCULATE(
    MAX('nasa power weather data'[Air Temperature]),
    'nasa power weather data'[Soil Surface Temp] = MinSoil
)&lt;/PRE&gt;&lt;P&gt;MIN respects the current filter context, and CALCULATE narrows the table to rows matching that minimum, so the inner MAX returns the air temp on the row with the lowest soil temp. If two rows ever tie on min soil temp, swap MAX for MIN, or use TOPN to pick exactly one row.&lt;/P&gt;&lt;P&gt;If this works for you, kindly mark it as the solution and give a thumbs up.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Shai Karmani&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 17:13:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177597#M187939</guid>
      <dc:creator>Shai_Karmani</dc:creator>
      <dc:date>2026-05-04T17:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177642#M187940</link>
      <description>&lt;P&gt;This will not work. The air temps are in a separate table from soil surface temps because&amp;nbsp;the air temps are recorded once per hour and the soil surface temps are recorded every 5 minutes (12 times per hour).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in my mind I need to identify the county and date that the minimum soil temperature was recorded in one table, and then 'search' another table for the air temperature in that county and on that date that will be displayed in the card on the dashboard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 19:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177642#M187940</guid>
      <dc:creator>ck_ky</dc:creator>
      <dc:date>2026-05-04T19:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177792#M187945</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1589270" data-lia-user-login="ck_ky" class="lia-mention lia-mention-user"&gt;ck_ky&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will this work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Min Air Temp at Min Soil =&lt;/P&gt;&lt;P&gt;VAR MinSoilRow = TOPN(1,'Soil Temp','Soil Temp'[Soil Surface Temperature (F)], ASC)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR MinDateTime = MAXX(MinSoilRow, 'Soil Temp'[DateTime])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR MinCounty = MAXX(MinSoilRow, 'Soil Temp'[County Name only])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;CALCULATE(MAX('Air Temp'[Air Temperature]),'Air Temp'[County Name only] = MinCounty,DATEVALUE('Air Temp'[DateTime]) =DATEVALUE(MinDateTime))&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 04:44:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177792#M187945</guid>
      <dc:creator>krishnakanth240</dc:creator>
      <dc:date>2026-05-05T04:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177878#M187947</link>
      <description>&lt;P&gt;Use CALCULATE with explicit filters on both County and Date instead of LOOKUPVALUE:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Min Daily Air Temp for Minimum Surface Temperature =
VAR _MinSurf =
    MIN ( 'Soil.Temp'[Soil Surface Temperature (F)] )
VAR _MinSurfDate =
    CALCULATE (
        SELECTEDVALUE ( 'Soil.Temp'[Date] ),
        'Soil.Temp'[Soil Surface Temperature (F)] = _MinSurf
    )
VAR _MinSurfCounty =
    CALCULATE (
        SELECTEDVALUE ( 'Soil.Temp'[County Name only] ),
        'Soil.Temp'[Soil Surface Temperature (F)] = _MinSurf
    )
RETURN
    CALCULATE (
        MIN ( 'NASA Power Weather Data'[MinTempF] ),
        'NASA Power Weather Data'[County Name only] = _MinSurfCounty,
        'NASA Power Weather Data'[Date] = _MinSurfDate
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 05 May 2026 07:12:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5177878#M187947</guid>
      <dc:creator>cengizhanarslan</dc:creator>
      <dc:date>2026-05-05T07:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5178045#M187958</link>
      <description>&lt;P&gt;Thank you for this suggestion.&lt;/P&gt;&lt;P&gt;However, I am still getting "BLANK" for the card.&lt;/P&gt;&lt;P&gt;Is there something with my data that may be causing this?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 12:30:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5178045#M187958</guid>
      <dc:creator>ck_ky</dc:creator>
      <dc:date>2026-05-05T12:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5178047#M187959</link>
      <description>&lt;P&gt;thanks for this suggestion.&lt;/P&gt;&lt;P&gt;However, dax won't 'allow' 'air temp' [county name only] to be an option in the CALCULATE function.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 12:31:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5178047#M187959</guid>
      <dc:creator>ck_ky</dc:creator>
      <dc:date>2026-05-05T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5179696#M188004</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1589270" data-lia-user-login="ck_ky" class="lia-mention lia-mention-user"&gt;ck_ky&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your measure is returning BLANK, it's often because the filter context isn't finding an exact row match between the two tables. Since your soil data is recorded every 5 minutes and the air data is hourly, the Date/Time fields likely don't line up perfectly.&lt;/P&gt;
&lt;P&gt;Here are a few things to check:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Ensure both tables use the same Date column datatype and format.
&lt;UL&gt;
&lt;LI&gt;One table might have full DateTime values, while the other only has Dates.&lt;/LI&gt;
&lt;LI&gt;Even a hidden time component can prevent a match.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Try matching only on the Date part, not the full DateTime.&lt;/LI&gt;
&lt;LI&gt;Confirm that county names match exactly in both tables.
&lt;UL&gt;
&lt;LI&gt;Extra spaces or differences in capitalization can also result in BLANK values.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;You can test with a simplified formula like this:&lt;/P&gt;
&lt;P&gt;Min Daily Air Temp =&lt;BR /&gt;VAR _MinSoil =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MIN ( 'Soil.Temp'[Soil Surface Temperature (F)] )&lt;BR /&gt;&lt;BR /&gt;VAR _Date =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CALCULATE (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MIN ( 'Soil.Temp'[Date] ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Soil.Temp',&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Soil.Temp'[Soil Surface Temperature (F)] = _MinSoil&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;BR /&gt;&lt;BR /&gt;VAR _County =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CALCULATE (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECTEDVALUE ( 'Soil.Temp'[County Name only] ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Soil.Temp',&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Soil.Temp'[Soil Surface Temperature (F)] = _MinSoil&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MIN ( 'NASA Power Weather Data'[MinTempF] ),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FILTER (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'NASA Power Weather Data',&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'NASA Power Weather Data'[County Name only] = _County&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;&amp;amp; DATEVALUE ( 'NASA Power Weather Data'[Date] ) = DATEVALUE ( _Date )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;If you still get BLANK, try creating a temporary table visual displaying:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Soil Temp Date&lt;/LI&gt;
&lt;LI&gt;Air Temp Date&lt;/LI&gt;
&lt;LI&gt;County from both tables&lt;/LI&gt;
&lt;LI&gt;The calculated variables&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This can help pinpoint which field isn't matching between the tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2026 07:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5179696#M188004</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2026-05-08T07:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5180852#M188041</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1589270" data-lia-user-login="ck_ky" class="lia-mention lia-mention-user"&gt;ck_ky&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;SPAN data-teams="true"&gt;hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2026 11:45:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5180852#M188041</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2026-05-11T11:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create measure to return value from column when condition met for two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5183304#M188078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1589270" data-lia-user-login="ck_ky" class="lia-mention lia-mention-user"&gt;ck_ky&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;SPAN data-teams="true"&gt;Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2026 06:44:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-measure-to-return-value-from-column-when-condition-met/m-p/5183304#M188078</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2026-05-15T06:44:01Z</dc:date>
    </item>
  </channel>
</rss>

