<?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 trouble &amp;quot;thinking in DAX&amp;quot; WRT new calculated column based on two other columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3279948#M121811</link>
    <description>&lt;P&gt;PBIC,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below link is to an .xlsx file with two tabs.&amp;nbsp; Tab one is "raw data" and tab two is "expected results".&amp;nbsp; I stopped manually entering my expected results in row 163 of column G.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="data file" href="https://1drv.ms/x/s!AiY07PwRMPgKije_YP9Z-DNyx_IB?e=8g5iEt" target="_self"&gt;https://1drv.ms/x/s!AiY07PwRMPgKije_YP9Z-DNyx_IB?e=8g5iEt&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In raw data tab, column D named "County, ST" is sorted alphabetically.&amp;nbsp; There are many cities within the same county name.&amp;nbsp; For example, first county name is "Abbeville, SC"... and it contains 7 different cities.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the same tab, the next column E, named "City, St.GmapsExt" contains both blanks and text of the city name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble thinking of a DAX expression that says this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a group of cells that are the same in column D, is True, then look in the same row, but in column E.&amp;nbsp; If ANY cell in column E contains text, within the group of cells that are the same in column D, then "YES", otherwise, "NO".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR, the inverse (using Blank)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a group of cells that are the same in column D, is True, then look in the same row, but in column E.&amp;nbsp; If ALL cells in column E contains BLANK(), within the group of cells that are the same in column D, then "NO", otherwise, "YES".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2023 16:02:22 GMT</pubDate>
    <dc:creator>ryan1919</dc:creator>
    <dc:date>2023-06-12T16:02:22Z</dc:date>
    <item>
      <title>trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3279948#M121811</link>
      <description>&lt;P&gt;PBIC,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below link is to an .xlsx file with two tabs.&amp;nbsp; Tab one is "raw data" and tab two is "expected results".&amp;nbsp; I stopped manually entering my expected results in row 163 of column G.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="data file" href="https://1drv.ms/x/s!AiY07PwRMPgKije_YP9Z-DNyx_IB?e=8g5iEt" target="_self"&gt;https://1drv.ms/x/s!AiY07PwRMPgKije_YP9Z-DNyx_IB?e=8g5iEt&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In raw data tab, column D named "County, ST" is sorted alphabetically.&amp;nbsp; There are many cities within the same county name.&amp;nbsp; For example, first county name is "Abbeville, SC"... and it contains 7 different cities.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the same tab, the next column E, named "City, St.GmapsExt" contains both blanks and text of the city name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble thinking of a DAX expression that says this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a group of cells that are the same in column D, is True, then look in the same row, but in column E.&amp;nbsp; If ANY cell in column E contains text, within the group of cells that are the same in column D, then "YES", otherwise, "NO".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR, the inverse (using Blank)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a group of cells that are the same in column D, is True, then look in the same row, but in column E.&amp;nbsp; If ALL cells in column E contains BLANK(), within the group of cells that are the same in column D, then "NO", otherwise, "YES".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 16:02:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3279948#M121811</guid>
      <dc:creator>ryan1919</dc:creator>
      <dc:date>2023-06-12T16:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3280082#M121820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="546406" data-lia-user-login="ryan1919" class="lia-mention lia-mention-user"&gt;ryan1919&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Flag =&lt;BR /&gt;IF (&lt;BR /&gt;BLANK ()&lt;BR /&gt;IN CALCULATETABLE (&lt;BR /&gt;VALUES ( 'Table'[Column E] ),&lt;BR /&gt;ALLEXCEPT ( 'Table', 'Table'[Column D] )&lt;BR /&gt;),&lt;BR /&gt;"No",&lt;BR /&gt;"Yes"&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 18:00:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3280082#M121820</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-12T18:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3285672#M122134</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the attempt.&lt;/P&gt;&lt;P&gt;I used the above code to enter into *.pbix file, however it did not work as anticipated.&lt;/P&gt;&lt;P&gt;I have shared a link to the *.pbix file below for reference.&lt;/P&gt;&lt;P&gt;&lt;A title="data file .pbix" href="https://1drv.ms/u/s!AiY07PwRMPgKikE8uukhIDqxd9D0?e=EFNrfs" target="_self"&gt;https://1drv.ms/u/s!AiY07PwRMPgKikE8uukhIDqxd9D0?e=EFNrfs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attempted to add a couple of columns to the side, to break down the code further, to see how the individual parts to the whole worked, but I could not see a clear item of issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ryan&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 10:02:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3285672#M122134</guid>
      <dc:creator>ryan1919</dc:creator>
      <dc:date>2023-06-15T10:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3285753#M122144</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="546406" data-lia-user-login="ryan1919" class="lia-mention lia-mention-user"&gt;ryan1919&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If you sort by&amp;nbsp;&lt;SPAN&gt;[County, ST]you will see that almost all counties have some blank cities. Unless I misunderstood&amp;nbsp;the requirement, I can say it is working as intended.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 10:47:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3285753#M122144</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-15T10:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3286223#M122187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to take your start, using "blank" allvalues" and "except", do a little more digging, and I found a similar example which is a result I was looking for.&amp;nbsp; Thanks for your help in starting out solution!&amp;nbsp; I posted code below, and also updated *pbix file.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
IF(
    ISBLANK(
        CALCULATE(
            MAX('raw data'[City, ST.GmapsExt (Artikel)]),
            ( ALLEXCEPT('raw data','raw data'[County, ST (Auftgragsnummer)] ) ),
            'raw data'[City, ST.GmapsExt (Artikel)] &amp;lt;&amp;gt; BLANK()
        )
    ),
    "NO COUNTY DATA",
    "YES"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AiY07PwRMPgKikE8uukhIDqxd9D0?e=bacTso" target="_self"&gt;https://1drv.ms/u/s!AiY07PwRMPgKikE8uukhIDqxd9D0?e=bacTso&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;-Ryan&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:01:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3286223#M122187</guid>
      <dc:creator>ryan1919</dc:creator>
      <dc:date>2023-06-15T15:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3286226#M122189</link>
      <description>&lt;P&gt;oh... here was the other example I ended up finding that worked:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-multiple-Rows-with-same-value-in-column-1-when-a-value-in/m-p/2710414#M82300" target="_self"&gt;https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-multiple-Rows-with-same-value-in-column-1-when-a-value-in/m-p/2710414#M82300&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:02:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3286226#M122189</guid>
      <dc:creator>ryan1919</dc:creator>
      <dc:date>2023-06-15T15:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: trouble "thinking in DAX" WRT new calculated column based on two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3286374#M122197</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="546406" data-lia-user-login="ryan1919" class="lia-mention lia-mention-user"&gt;ryan1919&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Happy that you found a solution!&lt;BR /&gt;I was clearly working under a misunderstanding of your requirement. The reason is that I relied on my my interpretation of your original DAX code rather than carefully&amp;nbsp;reading your description.&amp;nbsp;&lt;BR /&gt;I thought the requirement says if at least one blank city in the county then "NO"... and that "YES" applies only if no blanks at all.&amp;nbsp;&lt;BR /&gt;Anyway, this is how I would solve the problem.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Flag = 
IF (
    ISEMPTY (
        FILTER (
            CALCULATETABLE(
                VALUES ( 'raw data'[City, ST.GmapsExt] ),
                ALLEXCEPT ( 'raw data', 'raw data'[County, ST] )
            ),
            'raw data'[City, ST.GmapsExt] &amp;lt;&amp;gt; BLANK ( )
        )
    ),
    "NO COUNTY DATA",
    "YES"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:47:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/trouble-quot-thinking-in-DAX-quot-WRT-new-calculated-column/m-p/3286374#M122197</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-15T15:47:15Z</dc:date>
    </item>
  </channel>
</rss>

