<?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 Date and Season Dax help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-and-Season-Dax-help/m-p/3116791#M110397</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am very new to Power bi.&lt;/P&gt;&lt;P&gt;I have a Date and Season and Fact Table.&lt;/P&gt;&lt;P&gt;They are connected with 1-many reations.&lt;BR /&gt;&lt;BR /&gt;In seasons table I have 2 seasons(F and S)&lt;BR /&gt;The season F is from previous year March to November (Season F22&amp;nbsp; =&amp;nbsp; March 2021- Nov 2021 )&lt;/P&gt;&lt;P&gt;The season S is from previous year December to Feb (Season F22&amp;nbsp; =&amp;nbsp; December 2021- Feb 2021 )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My ask is , If user selects a date then it shoud show the current year(whate ever is the selected date) and previous year dates in a&amp;nbsp; bar chart to compare data.&amp;nbsp;Dates are not sequential we need to compare to the closest dates&lt;/P&gt;&lt;P&gt;This is to compare data &lt;STRONG&gt;by dates with season.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="TestDATA" href="C:\Users\ishuw\OneDrive\PBIX" target="_self"&gt;TestData&lt;/A&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>Tue, 07 Mar 2023 15:35:32 GMT</pubDate>
    <dc:creator>Kate_newmember</dc:creator>
    <dc:date>2023-03-07T15:35:32Z</dc:date>
    <item>
      <title>Date and Season Dax help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-and-Season-Dax-help/m-p/3116791#M110397</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am very new to Power bi.&lt;/P&gt;&lt;P&gt;I have a Date and Season and Fact Table.&lt;/P&gt;&lt;P&gt;They are connected with 1-many reations.&lt;BR /&gt;&lt;BR /&gt;In seasons table I have 2 seasons(F and S)&lt;BR /&gt;The season F is from previous year March to November (Season F22&amp;nbsp; =&amp;nbsp; March 2021- Nov 2021 )&lt;/P&gt;&lt;P&gt;The season S is from previous year December to Feb (Season F22&amp;nbsp; =&amp;nbsp; December 2021- Feb 2021 )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My ask is , If user selects a date then it shoud show the current year(whate ever is the selected date) and previous year dates in a&amp;nbsp; bar chart to compare data.&amp;nbsp;Dates are not sequential we need to compare to the closest dates&lt;/P&gt;&lt;P&gt;This is to compare data &lt;STRONG&gt;by dates with season.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="TestDATA" href="C:\Users\ishuw\OneDrive\PBIX" target="_self"&gt;TestData&lt;/A&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>Tue, 07 Mar 2023 15:35:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-and-Season-Dax-help/m-p/3116791#M110397</guid>
      <dc:creator>Kate_newmember</dc:creator>
      <dc:date>2023-03-07T15:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date and Season Dax help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-and-Season-Dax-help/m-p/3120263#M110625</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="525522" data-lia-user-login="Kate_newmember" class="lia-mention lia-mention-user"&gt;Kate_newmember&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I can't download your pbix file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you can have a try.&lt;/P&gt;
&lt;P&gt;Disabling relationships between date tables and other tables. Then create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
VAR _selectedvalue =
    SELECTEDVALUE ( date[date] )
VAR _1yearago =
    EDATE ( _selectedvalue, -12 )
VAR _value =
    CALCULATE (
        MAX ( table[value] ),
        FILTER ( ALL ( table ), table[date] = _1yearago )
    )
VAR _datediff =
    DATEDIFF ( _1yearago, MAX ( date[date] ), DAY )
VAR _minx =
    MINX ( ALL ( date ), _datediff )
VAR _minxvalue =
    CALCULATE (
        MAX ( table[value] ),
        FILTER ( ALL ( table ), table[date] = _minx )
    )
RETURN
    IF ( _value = blank, _minxvalue, _value )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 01:48:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-and-Season-Dax-help/m-p/3120263#M110625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-09T01:48:18Z</dc:date>
    </item>
  </channel>
</rss>

