<?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 a calculated column to get all values as True if a word is contained in another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2735904#M83898</link>
    <description>&lt;P&gt;Hi Adescrit, thank you for replying. I would like to mention that the columns shown are from different tables and MDR is the column I created (tried to solve the problem). The tables are linked like this, Events is in the middle. This might change the structure of the formula. What I intended to do is to be able to select which [Number} -unique value has a "MDR" subtype attached to it. If the new column can show "Yes" or "1" for all the subtypes with the same Number, that I can filter and solve the issue. Hope this helps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 16:39:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-08-30T16:39:55Z</dc:date>
    <item>
      <title>Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2733457#M83775</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;I would like to create a calculated column to give me a true value for all elements if a word is contained inside and use it later as a filter to select records that have that word or not. I have a screen shot of a table with some results. I did created a column :MDR" to give me 1 if MDR word existd in Subtype column, but I want to get all values as "1" if MDR word exists in Subtype column and "0" or false or "No MDR" otherwise. Here it shows "1" only for "MDR" values, and I want "1" for "LSD", "NP",... also. Any help is much appreciated. Thank you&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 20:18:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2733457#M83775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-29T20:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2735832#M83894</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MDR =
VAR __CountMDR =
    CALCULATE (
        COUNTROWS ( 'Table (2)' ),
        ALL ( 'Table (2)' ),
        'Table (2)'[Subtype] = "MDR",
        'Table (2)'[Number] = EARLIER ( 'Table (2)'[Number] )
    )
RETURN
    IF ( __CountMDR &amp;gt; 0, 1, 0 )
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Aug 2022 16:17:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2735832#M83894</guid>
      <dc:creator>Adescrit</dc:creator>
      <dc:date>2022-08-30T16:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2735904#M83898</link>
      <description>&lt;P&gt;Hi Adescrit, thank you for replying. I would like to mention that the columns shown are from different tables and MDR is the column I created (tried to solve the problem). The tables are linked like this, Events is in the middle. This might change the structure of the formula. What I intended to do is to be able to select which [Number} -unique value has a "MDR" subtype attached to it. If the new column can show "Yes" or "1" for all the subtypes with the same Number, that I can filter and solve the issue. Hope this helps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 16:39:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2735904#M83898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-30T16:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2736098#M83920</link>
      <description>&lt;P&gt;I tried the formula, but it seems that the Earlier function doesn't like the column and parameter type. I guess it should be a RELATED function somewhere.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 18:21:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2736098#M83920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-30T18:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2737336#M83968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the two columns are in different tables, but what you want to do is display the result 1 or 0 in a table visual with the numbers and subtypes, you could try this formula for a &lt;EM&gt;measure:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MDR = 
VAR __Num = SELECTEDVALUE( Assets_extended[id_regnum] )
VAR __CountMDR = CALCULATE( COUNTROWS( Artifacts_extended ),
    ALL( Artifacts_extended ),
    Artifacts_extended[Subtype] = "MDR",
    Assets_extended[id_regnum] = __Num
)
RETURN
    IF ( __CountMDR &amp;gt; 0, 1, 0 )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 31 Aug 2022 07:58:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2737336#M83968</guid>
      <dc:creator>Adescrit</dc:creator>
      <dc:date>2022-08-31T07:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2738226#M84035</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="126383" data-lia-user-login="Adescrit" class="lia-mention lia-mention-user"&gt;Adescrit&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I would like to create a column so I can use it as filter to find Assets with MDR or Assets without MDR. If the resulting column is showing 0 for Assets without MDR (all subtypes) and 1 for assets with MDr (all subtypes), I can filter it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;For example asset __888 doesn't have MDR, so MDR test 1 should show 0 for all 7 subtypes. Asset ---4428 has MDR, so MDR test 1 should show 1 for all five subtypes, __00446 should show 0, __4150 should show 0. Hope you understand the requirement. The measure is not helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 13:41:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2738226#M84035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-31T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2739094#M84105</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can add this column to the Assets_extended table and it should return 1 for each asset that contains an "artifact" with a subtype of MDR. You can then use that column to filter the rest of the dataset. Make sure you set the Summarization to "Don't Summarize" for it to display correctly in a table or matrix visual (if you need to add it to one).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MDR = 
    VAR __Num = [Number]
    VAR __MDRCount = CALCULATE( COUNTROWS( Artifacts_ext ), Artifacts_ext[Subtype] = "MDR" )
RETURN
    IF( __MDRCount &amp;gt; 0 , 1, 0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively if you want to create the column on the artifacts_ext table then you can try this (however I'm not sure you would be able to apply filters on your dataset based on your current model and filter directions):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MDR = 
VAR __Num = RELATED(Assets_extended[Number])
VAR __MDRCount = CALCULATE( COUNTROWS( Artifacts_ext ), ALL(Artifacts_ext), Assets_extended[Number] = __Num, Artifacts_ext[Subtype] = "MDR" )
RETURN
    IF( __MDRCount &amp;gt; 0, 1, 0 )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 31 Aug 2022 20:55:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2739094#M84105</guid>
      <dc:creator>Adescrit</dc:creator>
      <dc:date>2022-08-31T20:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated column to get all values as True if a word is contained in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2739128#M84109</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="126383" data-lia-user-login="Adescrit" class="lia-mention lia-mention-user"&gt;Adescrit&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;It will do the trick. Appreciate your prompt responses. Accepted as solution&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 21:15:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-calculated-column-to-get-all-values-as-True-if-a-word/m-p/2739128#M84109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-31T21:15:09Z</dc:date>
    </item>
  </channel>
</rss>

