<?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: Urgent- How to create a calculated column based on conditions in two other columns in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205811#M51897</link>
    <description>&lt;P&gt;can you share an example of your underlying table data?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 12:38:07 GMT</pubDate>
    <dc:creator>Cbutler</dc:creator>
    <dc:date>2021-11-24T12:38:07Z</dc:date>
    <item>
      <title>Urgent- How to create a calculated column based on conditions in two other columns in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205744#M51893</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a calculated column based on conditions in other two columns in the same table to to have three age groups&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Age groups = Calculate(IF(filter('Table', 'Table'[Year group] = "N"&amp;nbsp; || able', 'Table'[Year group]able', 'Table'[Year group]="E" &amp;amp;&amp;amp; FILTER(Table', 'Table'[Age] &amp;lt; 5)), "Nursery", IF(filter(able', 'Table'[Year group] = "12" ||&amp;nbsp;'Table'[Year group]= "13" &amp;amp;&amp;amp; FILTER(Table', 'Table'[Age] &amp;gt; 15)), "Other year groups", "5-15 years")))&lt;/P&gt;&lt;P&gt;The code above gives me&amp;nbsp; this error:&lt;/P&gt;&lt;P&gt;The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please hel me fixx the code?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:07:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205744#M51893</guid>
      <dc:creator>Walaa_86</dc:creator>
      <dc:date>2021-11-24T12:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent- How to create a calculated column based on conditions in two other columns in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205811#M51897</link>
      <description>&lt;P&gt;can you share an example of your underlying table data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:38:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205811#M51897</guid>
      <dc:creator>Cbutler</dc:creator>
      <dc:date>2021-11-24T12:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent- How to create a calculated column based on conditions in two other columns in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205844#M51903</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how my table looks like. I need to separate the age grous so that I can have Age group as a filter and while I'm filtering for the "nursery" it only shows me year N or E in the year group filter.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:51:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205844#M51903</guid>
      <dc:creator>Walaa_86</dc:creator>
      <dc:date>2021-11-24T12:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent- How to create a calculated column based on conditions in two other columns in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205852#M51904</link>
      <description>&lt;P&gt;This is how I want my Age group column to look like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:56:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2205852#M51904</guid>
      <dc:creator>Walaa_86</dc:creator>
      <dc:date>2021-11-24T12:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent- How to create a calculated column based on conditions in two other columns in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2211767#M52202</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="341081" data-lia-user-login="Walaa_86" class="lia-mention lia-mention-user"&gt;Walaa_86&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try using only the IF function.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Age groups =
IF (
    [Year group] = "N",
    "Nursery",
    IF (
        [Year group] = "E"
            &amp;amp;&amp;amp; [Age] &amp;lt; 5,
        "Nursery",
        IF (
            [Year group] = "12"
                || [Year group] = "13"
                &amp;amp;&amp;amp; [Age] &amp;gt; 5,
            "Other year groups",
            "5-15 years"
        )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 10:02:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-How-to-create-a-calculated-column-based-on-conditions-in/m-p/2211767#M52202</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2021-11-29T10:02:58Z</dc:date>
    </item>
  </channel>
</rss>

