<?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: Help in creating Ratio Delta measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-in-creating-Ratio-Delta-measure/m-p/3970442#M153989</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="753883" data-lia-user-login="Ashwini_09" class="lia-mention lia-mention-user"&gt;Ashwini_09&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I can confirm that if the field applied on the year slicer originate from the same table as the year field in the table visual, the table visual will indeed display only the corresponding data for the selected year, as you have correctly pointed out.&lt;/P&gt;
&lt;P&gt;To accomplish your objective, you may follow the steps outlined below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Create a Year Dimension Table&lt;/STRONG&gt;: Initiate by creating a year dimension table. Please ensure that you do not create any relationship with your fact table at this stage.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. Apply the Year field&lt;/STRONG&gt;: Subsequently, apply the year field from the newly created Year dimension table to the year slicer, effectively &lt;FONT color="#FF0000"&gt;replacing &lt;/FONT&gt;the original year field .&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. Create Measure&lt;/STRONG&gt;: Finally, create the necessary measure to obtain the &lt;SPAN&gt;ratio difference&lt;/SPAN&gt;.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _selyear =
    SELECTEDVALUE ( 'Years'[Year] )
VAR _curratio =
    CALCULATE (
        SUM ( 'Table'[Ratio] ),
        FILTER ( 'Table', 'Table'[Year] = _selyear )
    )
VAR _preratio =
    CALCULATE (
        SUM ( 'Table'[Ratio] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Year] = _selyear - 1 )
    )
RETURN
    _curratio - _preratio&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the above one can't help you figure out, please&amp;nbsp;provide some&amp;nbsp;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&amp;nbsp;in your table (&lt;EM&gt;&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;&lt;/EM&gt;) with&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;format&amp;nbsp;and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&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;SPAN&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%7C02%7Cv-yiruan%40microsoft.com%7Cfe6489193a1b4b3b2c3108dc521fb7ce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638475543436019904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=v%2BEWR63B7CH%2BV5oWqwumB56nQFj9ualyOO61gu8e5SI%3D&amp;amp;reserved=0" target="_blank" rel="noopener nofollow noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;STRONG&gt;it is better&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;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;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&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=05%7C02%7Cv-yiruan%40microsoft.com%7Cfe6489193a1b4b3b2c3108dc521fb7ce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638475543436025251%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=VsmePB5Y0qB9BNuqnghHQeZSKzaaithvIv0fLr7iulE%3D&amp;amp;reserved=0" target="_blank" rel="noopener nofollow noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 06:46:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-06-04T06:46:11Z</dc:date>
    <item>
      <title>Help in creating Ratio Delta measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-in-creating-Ratio-Delta-measure/m-p/3969022#M153926</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, I have the following dataset (image attached). I want to find the Ratio difference as a measure for each year based on the current position effective date column. For e.g. if the year filter is 2023, I want the calculation to be 0.76-0.67, similarly for year 2022 the calculation should be 0.74-0.67. I am facing issues in this logic because the when I filter by year I lose the data from other years. Could you please help me with some pointers on how to solve? I have tried multiple approaches based on my knowledge but can't reach to a solution. &lt;/SPAN&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;</description>
      <pubDate>Mon, 03 Jun 2024 14:07:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-in-creating-Ratio-Delta-measure/m-p/3969022#M153926</guid>
      <dc:creator>Ashwini_09</dc:creator>
      <dc:date>2024-06-03T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help in creating Ratio Delta measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-in-creating-Ratio-Delta-measure/m-p/3970442#M153989</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="753883" data-lia-user-login="Ashwini_09" class="lia-mention lia-mention-user"&gt;Ashwini_09&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I can confirm that if the field applied on the year slicer originate from the same table as the year field in the table visual, the table visual will indeed display only the corresponding data for the selected year, as you have correctly pointed out.&lt;/P&gt;
&lt;P&gt;To accomplish your objective, you may follow the steps outlined below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Create a Year Dimension Table&lt;/STRONG&gt;: Initiate by creating a year dimension table. Please ensure that you do not create any relationship with your fact table at this stage.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. Apply the Year field&lt;/STRONG&gt;: Subsequently, apply the year field from the newly created Year dimension table to the year slicer, effectively &lt;FONT color="#FF0000"&gt;replacing &lt;/FONT&gt;the original year field .&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. Create Measure&lt;/STRONG&gt;: Finally, create the necessary measure to obtain the &lt;SPAN&gt;ratio difference&lt;/SPAN&gt;.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _selyear =
    SELECTEDVALUE ( 'Years'[Year] )
VAR _curratio =
    CALCULATE (
        SUM ( 'Table'[Ratio] ),
        FILTER ( 'Table', 'Table'[Year] = _selyear )
    )
VAR _preratio =
    CALCULATE (
        SUM ( 'Table'[Ratio] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Year] = _selyear - 1 )
    )
RETURN
    _curratio - _preratio&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the above one can't help you figure out, please&amp;nbsp;provide some&amp;nbsp;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&amp;nbsp;in your table (&lt;EM&gt;&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;&lt;/EM&gt;) with&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;format&amp;nbsp;and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&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;SPAN&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%7C02%7Cv-yiruan%40microsoft.com%7Cfe6489193a1b4b3b2c3108dc521fb7ce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638475543436019904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=v%2BEWR63B7CH%2BV5oWqwumB56nQFj9ualyOO61gu8e5SI%3D&amp;amp;reserved=0" target="_blank" rel="noopener nofollow noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;STRONG&gt;it is better&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;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;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&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=05%7C02%7Cv-yiruan%40microsoft.com%7Cfe6489193a1b4b3b2c3108dc521fb7ce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638475543436025251%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=VsmePB5Y0qB9BNuqnghHQeZSKzaaithvIv0fLr7iulE%3D&amp;amp;reserved=0" target="_blank" rel="noopener nofollow noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 06:46:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-in-creating-Ratio-Delta-measure/m-p/3970442#M153989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-04T06:46:11Z</dc:date>
    </item>
  </channel>
</rss>

