<?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: how to display data of previous years in years but current year data in quarters in same visual? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4010212#M157788</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="592536" data-lia-user-login="swtgoyal" class="lia-mention lia-mention-user"&gt;swtgoyal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;/P&gt;
&lt;P&gt;Here I create a set of sample:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then add 3 calculated columns:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year/Quartor =
VAR _currentYear =
    YEAR ( TODAY () )
VAR _Year =
    YEAR ( 'Table'[Date] )
RETURN
    IF (
        _Year &amp;lt;&amp;gt; _currentYear,
        FORMAT ( [Date], "YYYY" ),
        FORMAT ( 'Table'[Date], "YYYY-Q" )
    )
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Year/Month =
VAR _currentYear =
    YEAR ( TODAY () )
VAR _Year =
    YEAR ( 'Table'[Date] )
RETURN
    IF (
        _Year &amp;lt;&amp;gt; _currentYear,
        FORMAT ( [Date], "YYYY" ),
        FORMAT ( 'Table'[Date], "YYYY-MM" )
    )
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Year = YEAR('Table'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Next create 2 calculated tables:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Quartor = 
SUMMARIZE('Table','Table'[Year/Quartor],'Table'[Year])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Month = 
SUMMARIZE('Table','Table'[Year/Month],'Table'[Year])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Click the Year/Quartor and select year in sort by column, and Year/Month so on&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create the relationship between these tables:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The result is as follow:&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;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 02:45:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-06-26T02:45:05Z</dc:date>
    <item>
      <title>how to display data of previous years in years but current year data in quarters in same visual?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4009827#M157726</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a visual to show revenue/growth of previous and current years. I have the date table, created today/prior flags and, current year/quarter flag.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the visual should show the data at quarter/month level, i created data hierarchy so that's possisble but I am not able to display the data at year level for prior years but current year data at quarter level.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below visual shows yearly data so it works untill 2023 but since 2024 is current year, how to show 2 more bars as 2024 Q1, 2024Q2 and so on..&amp;nbsp; and same way if want to do at monthly level.. 2024 Jan, 2024 Feb and so on..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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, 25 Jun 2024 21:05:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4009827#M157726</guid>
      <dc:creator>swtgoyal</dc:creator>
      <dc:date>2024-06-25T21:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to display data of previous years in years but current year data in quarters in same visual?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4010212#M157788</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="592536" data-lia-user-login="swtgoyal" class="lia-mention lia-mention-user"&gt;swtgoyal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;/P&gt;
&lt;P&gt;Here I create a set of sample:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then add 3 calculated columns:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year/Quartor =
VAR _currentYear =
    YEAR ( TODAY () )
VAR _Year =
    YEAR ( 'Table'[Date] )
RETURN
    IF (
        _Year &amp;lt;&amp;gt; _currentYear,
        FORMAT ( [Date], "YYYY" ),
        FORMAT ( 'Table'[Date], "YYYY-Q" )
    )
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Year/Month =
VAR _currentYear =
    YEAR ( TODAY () )
VAR _Year =
    YEAR ( 'Table'[Date] )
RETURN
    IF (
        _Year &amp;lt;&amp;gt; _currentYear,
        FORMAT ( [Date], "YYYY" ),
        FORMAT ( 'Table'[Date], "YYYY-MM" )
    )
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Year = YEAR('Table'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Next create 2 calculated tables:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Quartor = 
SUMMARIZE('Table','Table'[Year/Quartor],'Table'[Year])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Month = 
SUMMARIZE('Table','Table'[Year/Month],'Table'[Year])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Click the Year/Quartor and select year in sort by column, and Year/Month so on&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create the relationship between these tables:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The result is as follow:&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;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 02:45:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4010212#M157788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-26T02:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to display data of previous years in years but current year data in quarters in same visual?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4011514#M157906</link>
      <description>&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created new calculated columns as suggested into the Date Table and it worked perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Swati&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 14:34:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-display-data-of-previous-years-in-years-but-current-year/m-p/4011514#M157906</guid>
      <dc:creator>swtgoyal</dc:creator>
      <dc:date>2024-06-26T14:34:36Z</dc:date>
    </item>
  </channel>
</rss>

