<?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: Bar chart by quarter including last quarter from previous year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/790847#M4516</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your help.&lt;/P&gt;&lt;P&gt;It seems I am almost there, can you please provide some insights on these 2 issues I am still having?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I was able to get up until step 4 from your instructions. However, when I tried to apply the filter for "Last Quarter Flag is 1", the following message popped up.&amp;nbsp; Any ideas how to fix this?&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;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Will I be able to sort the bars in chronological order? How?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 15:50:41 GMT</pubDate>
    <dc:creator>thalitakadlec</dc:creator>
    <dc:date>2019-09-12T15:50:41Z</dc:date>
    <item>
      <title>Bar chart by quarter including last quarter from previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/788566#M4420</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I currently have a report that shows me a selected year's metrics by quarter on a bar chart:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;However, I would like this view to also show me a bar for the last quarter of the previous year for comparison, that would still show up even if I have a page level filter for Year.&lt;/P&gt;&lt;P&gt;For example: if I filter my page to the year of 2018, I still want to see the last quarter of 2017 on my bar chart, to the left of the 2018 quarters bars, ideally looking something like this:&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;&lt;P&gt;Is this possible? How can I achieve this or something similar that serves the same purpose?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 18:34:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/788566#M4420</guid>
      <dc:creator>thalitakadlec</dc:creator>
      <dc:date>2019-09-10T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart by quarter including last quarter from previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/789481#M4463</link>
      <description>&lt;P&gt;Here's a link to pbix that i created:&lt;/P&gt;&lt;P&gt;After selecting 1998 as Year, it is showing all quarters of 1998 and Q4 of 1997.&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AikPceQOhqFEhA99DNyDpoZX8MYG?e=MGSHZD" target="_self"&gt;https://1drv.ms/u/s!AikPceQOhqFEhA99DNyDpoZX8MYG?e=MGSHZD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:29:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/789481#M4463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart by quarter including last quarter from previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/789681#M4472</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;However I unfortunately cannot access your file due to company security barriers regarding online file storage sites.&lt;/P&gt;&lt;P&gt;Would it be possible for you to explain how you created the view and maybe upload some pictures here of how you set this up in PB?&lt;/P&gt;&lt;P&gt;Sorry for the inconvenience and thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 16:14:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/789681#M4472</guid>
      <dc:creator>thalitakadlec</dc:creator>
      <dc:date>2019-09-11T16:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart by quarter including last quarter from previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/789707#M4476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Follow below steps to achieve this:&lt;/P&gt;&lt;P&gt;1. Create a Year Table with one column having just the different years from your calendar.&lt;/P&gt;&lt;P&gt;Create a slicer from this column. My model contains 2 years, so i have a table called YearTable with 2 rows and 1 once column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Create below measures:&lt;/P&gt;&lt;PRE&gt;Selected Year = SELECTEDVALUE( YearTable[Year] )

Last Quarter Flag = 
VAR v_PreviousYear = [Selected Year] - 1
VAR v_MaxYear = CALCULATE( MAX( 'Calendar'[Year] ) )
VAR v_MaxPreviousUear = v_MaxYear - 1
VAR v_MaxQuarter = CALCULATE( MAX( 'Calendar'[Quarter] ) )
RETURN
IF ( ( v_MaxYear == [Selected Year] ), "1", IF( (v_MaxYear == v_PreviousYear) &amp;amp;&amp;amp; (v_MaxQuarter == 4), "1", "0" ))&lt;/PRE&gt;&lt;P&gt;3. If you don't have a column for 'Quarter &amp;amp; Year', create it as:&lt;/P&gt;&lt;PRE&gt;Quarter &amp;amp; Year = "Qtr-" &amp;amp; 'Calendar'[Quarter] &amp;amp; " " &amp;amp; 'Calendar'[Year]&lt;/PRE&gt;&lt;P&gt;4. Drag Quarter &amp;amp; year column on X axis and your measure on the values part on a stacked column chart like in the image shown in previous message.&lt;/P&gt;&lt;P&gt;5. Add a visual level filter for this chart as below: (Last Quarter Flag = 1)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 16:37:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/789707#M4476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T16:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart by quarter including last quarter from previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/790847#M4516</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your help.&lt;/P&gt;&lt;P&gt;It seems I am almost there, can you please provide some insights on these 2 issues I am still having?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I was able to get up until step 4 from your instructions. However, when I tried to apply the filter for "Last Quarter Flag is 1", the following message popped up.&amp;nbsp; Any ideas how to fix this?&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;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Will I be able to sort the bars in chronological order? How?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:50:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/790847#M4516</guid>
      <dc:creator>thalitakadlec</dc:creator>
      <dc:date>2019-09-12T15:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart by quarter including last quarter from previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/790914#M4519</link>
      <description>Can you share the DAX written for the flag measure. Even better if you could share the pbix file.&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 12 Sep 2019 16:55:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-chart-by-quarter-including-last-quarter-from-previous-year/m-p/790914#M4519</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-12T16:55:09Z</dc:date>
    </item>
  </channel>
</rss>

