<?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: Need help with grouping a variable in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4168373#M165608</link>
    <description>&lt;P&gt;=&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;datevalue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[program]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;"-01"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"mmmm"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 23 Sep 2024 21:26:50 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-09-23T21:26:50Z</dc:date>
    <item>
      <title>Need help with grouping a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4165935#M165499</link>
      <description>&lt;P&gt;I have a variable called program. The data in program conforms to the format year-program where year can equal any year in the format yyyy, and program can be either 01, 04, 06, 09, 12. For example 2019-01, 2019-04, 2020-01, 2020-04, 2020-06.&lt;/P&gt;&lt;P&gt;I would like to create a new measure called 'program-grouped', where any program ending in '01' is called January, any program ending in '04' is called April, and any program ending in '06' is called June.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following but it did not work. Any ideas?&lt;BR /&gt;&lt;BR /&gt;Program-Grouped =&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;RIGHT([program], 2) = "01", "January",&lt;BR /&gt;RIGHT([program], 2) = "04", "April",&lt;BR /&gt;RIGHT([program], 2) = "06", "June",&lt;BR /&gt;"Other"&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 04:30:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4165935#M165499</guid>
      <dc:creator>DomMether</dc:creator>
      <dc:date>2024-09-23T04:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with grouping a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4168373#M165608</link>
      <description>&lt;P&gt;=&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;datevalue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[program]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;"-01"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"mmmm"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Sep 2024 21:26:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4168373#M165608</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-09-23T21:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with grouping a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4168771#M165621</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="810507" data-lia-user-login="DomMether" class="lia-mention lia-mention-user"&gt;DomMether&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try the below measure and also request you to share screenshot to check what error you are getting with the measure you are using..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt; -&amp;nbsp;Ensure that the program field is a text field, as numeric data types might not work well with string functions like RIGHT()&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Program-Grouped =&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;RIGHT(TRIM([program]), 2) = "01", "January",&lt;BR /&gt;RIGHT(TRIM([program]), 2) = "04", "April",&lt;BR /&gt;RIGHT(TRIM([program]), 2) = "06", "June","Other")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;Dharmendar S&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/in/dharmendar-s-b5b43463/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;LinkedIN&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 01:59:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4168771#M165621</guid>
      <dc:creator>dharmendars007</dc:creator>
      <dc:date>2024-09-24T01:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with grouping a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4169399#M165637</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="810507" data-lia-user-login="DomMether" class="lia-mention lia-mention-user"&gt;DomMether&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that what you were expecting?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If you are trying to batch convert month number to month name, the method provided by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp; is much easier to follow.&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;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 07:29:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4169399#M165637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-07T07:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with grouping a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4176602#M165834</link>
      <description>&lt;P&gt;I can't tell because for some reason I can't reference the column in my DAX formula.&amp;nbsp; Got any idea why that is?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 05:12:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4176602#M165834</guid>
      <dc:creator>DomMether</dc:creator>
      <dc:date>2024-09-26T05:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with grouping a variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4176655#M165841</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="810507" data-lia-user-login="DomMether" class="lia-mention lia-mention-user"&gt;DomMether&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
SWITCH(
TRUE(),
RIGHT(TRIM(SELECTEDVALUE('Table'[Program])), 2) = "01", "January",
RIGHT(TRIM(SELECTEDVALUE('Table'[Program])), 2) = "04", "April",
RIGHT(TRIM(SELECTEDVALUE('Table'[Program])), 2) = "06", "June",
"Other"
)&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;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 05:45:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-grouping-a-variable/m-p/4176655#M165841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-26T05:45:43Z</dc:date>
    </item>
  </channel>
</rss>

