<?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: Season  Help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3076274#M106960</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help me with this req . &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
    <pubDate>Sat, 11 Feb 2023 23:50:52 GMT</pubDate>
    <dc:creator>Puja</dc:creator>
    <dc:date>2023-02-11T23:50:52Z</dc:date>
    <item>
      <title>Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3070752#M106563</link>
      <description>&lt;P&gt;Hello All ,&lt;/P&gt;&lt;P&gt;I need some help with Season Slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Season and Date (Weekly Snapshots)table.&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SEASON&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;M19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;S19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;M20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;S20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;M21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;S21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;M22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;S22&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Season range :&lt;/P&gt;&lt;P&gt;If it is M&amp;nbsp; Jan&amp;nbsp; -July&lt;/P&gt;&lt;P&gt;If it is S April -March&lt;/P&gt;&lt;P&gt;If user selects M22, then the dates should be Jan thru July of same year(2022).&lt;/P&gt;&lt;P&gt;If user selects S22 then the dates shuld be Appril 2021 thru March 2022.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can some one help with this please.&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 02:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3070752#M106563</guid>
      <dc:creator>Puja</dc:creator>
      <dc:date>2023-02-09T02:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3070772#M106567</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405743" data-lia-user-login="Puja" class="lia-mention lia-mention-user"&gt;Puja&lt;/a&gt; , You have map these season with you date table. Date table should have column for that range. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this does not help&lt;BR /&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 03:01:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3070772#M106567</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-02-09T03:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3070836#M106573</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp; sorry this wont work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select season , I see previous years data as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 03:43:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3070836#M106573</guid>
      <dc:creator>Puja</dc:creator>
      <dc:date>2023-02-09T03:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3076274#M106960</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help me with this req . &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 23:50:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3076274#M106960</guid>
      <dc:creator>Puja</dc:creator>
      <dc:date>2023-02-11T23:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3076321#M106962</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Can you share sample data and sample output in table format?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2023 01:43:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3076321#M106962</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-12T01:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3080492#M107335</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405743" data-lia-user-login="Puja" class="lia-mention lia-mention-user"&gt;Puja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _select=SELECTEDVALUE('Season Table'[Season])
var _code=MAXX(FILTER(ALL('Season Table'),'Season Table'[Season]=_select),[Code])
var _MJulyfirst=MINX(FILTER(ALL('Date table'),YEAR('Date table'[Date])=2022&amp;amp;&amp;amp;MONTH('Date table'[Date])=7),[Date])
var _SMarchfirst=MINX(FILTER(ALL('Date table'),YEAR('Date table'[Date])=2022&amp;amp;&amp;amp;MONTH('Date table'[Date])=3),[Date])
return
SWITCH(
    TRUE(),
    _code="M"&amp;amp;&amp;amp;MAX('Date table'[Date])&amp;gt;=DATE(2022,1,1)&amp;amp;&amp;amp;MAX('Date table'[Date])&amp;lt;=_MJulyfirst,1,
    _code="S"&amp;amp;&amp;amp;MAX('Date table'[Date])&amp;gt;=DATE(2021,4,1)&amp;amp;&amp;amp;MAX('Date table'[Date])&amp;lt;=_SMarchfirst,1,0)&lt;/LI-CODE&gt;
&lt;P&gt;2. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;M22:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;S22:&lt;/P&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;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 01:01:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3080492#M107335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-15T01:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3080545#M107340</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp; Thank you somuch.&lt;/P&gt;&lt;P&gt;This looks promising solution.&lt;/P&gt;&lt;P&gt;Can we make it dynamic for other seasons as well ?&lt;/P&gt;&lt;P&gt;Date range is same for M and S types.&lt;/P&gt;&lt;P&gt;If user selects M type, then the dates should be Jan thru July (&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;min date&lt;/STRONG&gt;&lt;/FONT&gt;) of same year.&lt;/P&gt;&lt;P&gt;If user selects S type then the dates shuld be Appril thru March(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;min date&lt;/STRONG&gt;&lt;/FONT&gt;) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: season number represents year.&lt;/P&gt;&lt;P&gt;ex: M21 = YEAR 2021&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;S13 = YEAR 2013&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Puja&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 02:12:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3080545#M107340</guid>
      <dc:creator>Puja</dc:creator>
      <dc:date>2023-02-15T02:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3081067#M107385</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405743" data-lia-user-login="Puja" class="lia-mention lia-mention-user"&gt;Puja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can modify it to the following dax:&lt;/P&gt;
&lt;P&gt;When M is selected, the minimum value from January to July of the Season Year is displayed.&lt;/P&gt;
&lt;P&gt;When S is selected, the March of Season Year -1 to the April minimum of Season Year are displayed.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
VAR _select =
    SELECTEDVALUE ( 'Season Table'[Season] )
VAR _year =
    VALUE ( "20" &amp;amp; "" &amp;amp; RIGHT ( _select, 2 ) )
VAR _code =
    MAXX (
        FILTER ( ALL ( 'Season Table' ), 'Season Table'[Season] = _select ),
        [Code]
    )
VAR _MJulyfirst =
    MINX (
        FILTER (
            ALL ( 'Date table' ),
            YEAR ( 'Date table'[Date] ) = _year
                &amp;amp;&amp;amp; MONTH ( 'Date table'[Date] ) = 7
        ),
        [Date]
    )
VAR _SMarchfirst =
    MINX (
        FILTER (
            ALL ( 'Date table' ),
            YEAR ( 'Date table'[Date] ) = _year
                &amp;amp;&amp;amp; MONTH ( 'Date table'[Date] ) = 3
        ),
        [Date]
    )
VAR _Smindate =
    DATE ( _year - 1, 4, 1 )
RETURN
    SWITCH (
        TRUE (),
        _code = "M"
            &amp;amp;&amp;amp; MAX ( 'Date table'[Date] ) &amp;gt;= DATE ( _year, 1, 1 )
            &amp;amp;&amp;amp; MAX ( 'Date table'[Date] ) &amp;lt;= _MJulyfirst, 1,
        _code = "S"
            &amp;amp;&amp;amp; MAX ( 'Date table'[Date] ) &amp;gt;= _Smindate
            &amp;amp;&amp;amp; MAX ( 'Date table'[Date] ) &amp;lt;= _SMarchfirst, 1,
        0
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 08:54:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3081067#M107385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-15T08:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3081706#M107446</link>
      <description>&lt;P&gt;Perfect &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 15:21:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3081706#M107446</guid>
      <dc:creator>Puja</dc:creator>
      <dc:date>2023-02-15T15:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Season  Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3082928#M107544</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I just noticed one limitation,&lt;/P&gt;&lt;P&gt;When I select S23, should show , 2022 April until 2023 March.&lt;/P&gt;&lt;P&gt;But I see blanks. Any thoughts ?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:33:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Season-Help/m-p/3082928#M107544</guid>
      <dc:creator>Puja</dc:creator>
      <dc:date>2023-02-16T08:33:45Z</dc:date>
    </item>
  </channel>
</rss>

