<?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: Using slicer selection in visual with disabled interaction in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3453844#M131606</link>
    <description>&lt;P&gt;Can you please try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calucate(
SUMX(FILTER('DataTable','DataTable'[PeriodKey] = [PreviousPeriodKey]),'DataTable'[Value]))&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 29 Sep 2023 16:02:48 GMT</pubDate>
    <dc:creator>ChandrashekaraD</dc:creator>
    <dc:date>2023-09-29T16:02:48Z</dc:date>
    <item>
      <title>Using slicer selection in visual with disabled interaction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3453723#M131599</link>
      <description>&lt;P&gt;(updated)&lt;BR /&gt;Hi, community&lt;/P&gt;&lt;P&gt;I am trying to calculate some values for selected and previous custom time periods. I have indexed the time periods to be able to match them and managed to identify a previous period with a formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PreviousPeriodKey = SELECTEDVALUE('PeriodLookup'[PeriodKey])-1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I show this measure on the page with active slicer selection it shows correct value.&amp;nbsp;&lt;BR /&gt;However, when I try to use it in a calculation, regardless whether I save it as a separate measure, or use in VAR, I always get blank result on the very same page.&lt;/P&gt;&lt;P&gt;Here is the measure I am trying to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
SUMX(FILTER('DataTable','DataTable'[PeriodKey] = [PreviousPeriodKey]),'DataTable'[Value])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding calculate at the beginning as suggested below does not help. The issue is that when I keep the slicer filter active over the visual, the PreviousPeriodKey works well but the measure cannot retrieve data earlier than selected PeriodKey. And when the interaction between slicer and visual is disabled, the SELECTEDVALUE can't work properly.&lt;BR /&gt;The idea is to be able to calculate different measures for two consecutive category indexes (PeriodKey in the sample).&lt;BR /&gt;I have already checked the format of different columns and the measure itself as well as proper relationships are established between the tables.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 09:11:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3453723#M131599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-02T09:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using slicer selection in visual with disabled interaction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3453844#M131606</link>
      <description>&lt;P&gt;Can you please try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calucate(
SUMX(FILTER('DataTable','DataTable'[PeriodKey] = [PreviousPeriodKey]),'DataTable'[Value]))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 16:02:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3453844#M131606</guid>
      <dc:creator>ChandrashekaraD</dc:creator>
      <dc:date>2023-09-29T16:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using slicer selection in visual with disabled interaction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3455604#M131715</link>
      <description>&lt;P&gt;Unfortunately, this does not help... I wonder if this might be connected to the fact that I am trying to use a value (PreviousPeriodKey) that is based on slicer selection but in the calculation I am using formulas that might override it?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 07:30:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3455604#M131715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-02T07:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using slicer selection in visual with disabled interaction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3461150#M132019</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can &lt;STRONG&gt;update&lt;/STRONG&gt; the formula of measure as below and check if it can return the correct result...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR prepkey =
    SELECTEDVALUE ( 'PeriodLookup'[PeriodKey] ) - 1
RETURN
    SUMX (
        FILTER ( ALLSELECTED ( 'DataTable' ), 'DataTable'[PeriodKey] = prepkey ),
        'DataTable'[Value]
    )&lt;/LI-CODE&gt;
&lt;P&gt;If the above one can't help you get the expected result,&amp;nbsp;&lt;SPAN&gt;please provide some&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in your table (&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 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;</description>
      <pubDate>Thu, 05 Oct 2023 07:13:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-slicer-selection-in-visual-with-disabled-interaction/m-p/3461150#M132019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-05T07:13:21Z</dc:date>
    </item>
  </channel>
</rss>

