<?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: PY column not responding to MTD/QTD/YTD slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3742098#M145938</link>
    <description>&lt;P&gt;Hi, thank you for your respond. The only other slicer that I am using is "Month" slicer form 'Calendar'[Month]. Is there a way to write these measures in a way they are not hardcoded?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 07:42:11 GMT</pubDate>
    <dc:creator>Ema123</dc:creator>
    <dc:date>2024-03-05T07:42:11Z</dc:date>
    <item>
      <title>PY column not responding to MTD/QTD/YTD slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3740132#M145825</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm creating a Power BI dashboard using Zebra BI table visual with two columns: PY (Previous Year) and AC (Actuals). In my database "Baza 23," I have a column "Scenarij" that refers to either 2022 (Previous Year) or 2023 (Actuals). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also have a calendar table and I have made a connection between the calendar table (date column) and "Baza 23" (date column). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I made two measures: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1: AC filter = CALCULATE(SUM('Baza 23'[EUR]), 'Baza 23'[Scenarij] = "2023")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2: PY filter = CALCULATE(SUM('Baza 23'[EUR]), 'Baza 23'[Scenarij] = "2022")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I put these measures in the Zebra BI table, they work perfectly fine. However, I want to put an MTD/QTD/YTD slicer and connect it to these two columns so that when I choose a scenario in this slicer, the data in the PY column and AC column change accordingly. To achieve this, I created a "Selected Period" table with two columns: Period column and Period ID:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I added Selected period measure: Selected Period = MIN('Selected Period'[Period ID]). I was able to connect my columns to MTD/QTD/YTD slicer by using these two measures:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AC = SWITCH('Selected Period'[Selected Period], &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1, CALCULATE([AC filter], DATESMTD('Calendar'[Date])), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2, CALCULATE([AC filter], DATESQTD('Calendar'[Date])), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3, CALCULATE([AC filter], DATESYTD('Calendar'[Date]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PY = SWITCH('Selected Period'[Selected Period], &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1, CALCULATE([PY filter], DATESMTD('Calendar'[Date])), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2, CALCULATE([PY filter], DATESQTD('Calendar'[Date])), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3, CALCULATE([PY filter], DATESYTD('Calendar'[Date])))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AC measure works perfectly fine, but when I use the PY measure and put it in the Zebra BI table, the column doesn't show any numbers. Why is that and how can I fix this problem?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 13:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3740132#M145825</guid>
      <dc:creator>Ema123</dc:creator>
      <dc:date>2024-03-04T13:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: PY column not responding to MTD/QTD/YTD slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3742029#M145935</link>
      <description>&lt;P&gt;Hi, on the page itself, are you selecting any years from the calendar slicer/filter?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You have hardcoded years in your measures, so it might happen some other filters prevent you from seeing the numbers. Can you please give more info?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 07:20:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3742029#M145935</guid>
      <dc:creator>olgad</dc:creator>
      <dc:date>2024-03-05T07:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: PY column not responding to MTD/QTD/YTD slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3742098#M145938</link>
      <description>&lt;P&gt;Hi, thank you for your respond. The only other slicer that I am using is "Month" slicer form 'Calendar'[Month]. Is there a way to write these measures in a way they are not hardcoded?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 07:42:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3742098#M145938</guid>
      <dc:creator>Ema123</dc:creator>
      <dc:date>2024-03-05T07:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: PY column not responding to MTD/QTD/YTD slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3770866#M147275</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="700012" data-lia-user-login="Ema123" class="lia-mention lia-mention-user"&gt;Ema123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="254062" data-lia-user-login="olgad" class="lia-mention lia-mention-user"&gt;olgad&lt;/a&gt;&amp;nbsp; gives some direction and reasons on your problem. (&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="254062" data-lia-user-login="olgad" class="lia-mention lia-mention-user"&gt;olgad&lt;/a&gt;&amp;nbsp;&lt;SPAN&gt;Thanks to &lt;/SPAN&gt;&lt;SPAN&gt;for your efforts).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Please try to update the formula of below measures as below and check if they can return the expected result...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AC filter =
VAR _selyear =
    SELECTEDVALUE ( 'Calendar'[Year] )
RETURN
    CALCULATE ( SUM ( 'Baza 23'[EUR] ), 'Baza 23'[Scenarij] = _selyear )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;PY filter =
VAR _selyear =
    SELECTEDVALUE ( 'Calendar'[Year] )
RETURN
    CALCULATE (
        SUM ( 'Baza 23'[EUR] ),
        FILTER ( 'Baza 23', 'Baza 23'[Scenarij] = _selyear - 1 ),
        ALL ( 'Baza 23' )
    )&lt;/LI-CODE&gt;
&lt;P&gt;If the above ones can't help you figure out, please&amp;nbsp;&lt;SPAN&gt;provide some&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in your tables&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;) with&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;format&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and your&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=EJlYfclgtrjgAEYj9Uo1AauqxaQm3hlQsjJMo4zCY1M%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:02:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PY-column-not-responding-to-MTD-QTD-YTD-slicer/m-p/3770866#M147275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-18T09:02:36Z</dc:date>
    </item>
  </channel>
</rss>

