<?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 How to use different column value if slicer has selected value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4044742#M160432</link>
    <description>&lt;P&gt;My fact table is created like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Carrier&lt;/TD&gt;&lt;TD&gt;Score&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/2/2024&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;0.98&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/3/2024&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;0.95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1/2024&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;0.98&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/2/2024&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;0.95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/3/2024&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;0.9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a single dimensional table like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Carrier&lt;/TD&gt;&lt;TD&gt;Carrier Hide&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Carrier 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Carrier 2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is a single slicer which uses the [Carrier] value from the dimensional table. I'm wanting to create some functionality within the report that if someone selects a [Carrier] value, then it will return that [Carrier] value for that specific row, but will return the corresponding [Carrier Hide] value for each other row.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to obfuscate non-selected rows with a different value if they are not selected, but leave the rows in place within the visual itself. So, if no slicer values are selected, it would return [Carrier]. If [Carrier] "A" is selected, it would return "A" for one row and "Carrier 2" for the next row, since [Carrier] "B" was not selected.&lt;BR /&gt;&lt;BR /&gt;Any help/advice would be greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2024 18:50:40 GMT</pubDate>
    <dc:creator>swolfe2</dc:creator>
    <dc:date>2024-07-16T18:50:40Z</dc:date>
    <item>
      <title>How to use different column value if slicer has selected value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4044742#M160432</link>
      <description>&lt;P&gt;My fact table is created like this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&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&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is a single slicer which uses the [Carrier] value from the dimensional table. I'm wanting to create some functionality within the report that if someone selects a [Carrier] value, then it will return that [Carrier] value for that specific row, but will return the corresponding [Carrier Hide] value for each other row.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to obfuscate non-selected rows with a different value if they are not selected, but leave the rows in place within the visual itself. So, if no slicer values are selected, it would return [Carrier]. If [Carrier] "A" is selected, it would return "A" for one row and "Carrier 2" for the next row, since [Carrier] "B" was not selected.&lt;BR /&gt;&lt;BR /&gt;Any help/advice would be greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 18:50:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4044742#M160432</guid>
      <dc:creator>swolfe2</dc:creator>
      <dc:date>2024-07-16T18:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use different column value if slicer has selected value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4045760#M160462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354683" data-lia-user-login="swolfe2" class="lia-mention lia-mention-user"&gt;swolfe2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Selected Carrier = 
VAR SelectedCarrier = SELECTEDVALUE('Dimensional Table'[Carrier])
RETURN 
IF(
    ISFILTERED('Dimensional Table'[Carrier])
    &amp;amp;&amp;amp; 
    SELECTEDVALUE('Fact Table'[Carrier]) = SelectedCarrier, 
    SELECTEDVALUE('Fact Table'[Carrier]),
    LOOKUPVALUE('Dimensional Table'[Carrier Hide], 'Dimensional Table'[Carrier], SELECTEDVALUE('Fact Table'[Carrier]))
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 08:53:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4045760#M160462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-17T08:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use different column value if slicer has selected value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4046454#M160501</link>
      <description>&lt;P&gt;Thanks so much for looking into this,&amp;nbsp;Anonymous&lt;/a&gt;. Unfortunately, this solution doesn't quite do what I'm expecting. As an example, when there is no slicer slection, nothing is returned:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Filtering to Carrier A only has rows for Carrier A:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have added the &lt;A href="https://drive.google.com/file/d/17PJr3ZsgynMuNhaWkdiK7PB1ZbN_36T-/view?usp=sharing" target="_blank" rel="noopener"&gt;.pbix file to my Google Drive&lt;/A&gt;, and you can download it to experiment. Again, I do really appreciate the effort!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 15:48:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4046454#M160501</guid>
      <dc:creator>swolfe2</dc:creator>
      <dc:date>2024-07-17T15:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use different column value if slicer has selected value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4063343#M161297</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354683" data-lia-user-login="swolfe2" class="lia-mention lia-mention-user"&gt;swolfe2&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I noticed your message and I made some changes to the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, create a table.&amp;nbsp;And use the columns of the new table as slicers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Slicer Table = SELECTCOLUMNS('Carrier', "carrier", 'Carrier'[Carrier])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Selected Carrier = 
VAR SelectedCarrier = SELECTEDVALUE('Slicer Table'[carrier])
RETURN
IF(
    SELECTEDVALUE('Fact'[Carrier]) = SelectedCarrier,
    SELECTEDVALUE('Fact'[Carrier]),
    LOOKUPVALUE('Carrier'[Carrier Hide], 'Carrier'[Carrier], SELECTEDVALUE('Fact'[Carrier]))
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&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;DIV id="tinyMceEditorvnuocmsft_1" class=""&gt;&amp;nbsp;
&lt;DIV id="tinyMceEditorvnuocmsft_2" class=""&gt;&amp;nbsp;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2024 08:42:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4063343#M161297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-26T08:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use different column value if slicer has selected value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4063652#M161314</link>
      <description>&lt;P&gt;This did it! Thanks so much for the detailed solution and .pbix file.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 11:26:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-different-column-value-if-slicer-has-selected-value/m-p/4063652#M161314</guid>
      <dc:creator>swolfe2</dc:creator>
      <dc:date>2024-07-26T11:26:09Z</dc:date>
    </item>
  </channel>
</rss>

