<?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 CurrentUser vs SelectedUsers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3569424#M137617</link>
    <description>&lt;P&gt;Hello Community -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PBIX can be found here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1ilGCO8C9UYytxPUA_NOcff31Xh7lwN5K/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1ilGCO8C9UYytxPUA_NOcff31Xh7lwN5K/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 01 builds a concatenated list of selected User ID's from the slicer.&lt;/P&gt;&lt;P&gt;Measure 02 gets the current User ID in each row of the table visual.&lt;/P&gt;&lt;P&gt;Measure 03:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;- I can't get M03 to work.&amp;nbsp; But this is what it's supposed to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;- IF(M02 IN M01,&amp;nbsp;1, 0)&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE 1: Without M03 in the table visual,&amp;nbsp;9 rows are correctly displayed (see screenshot 1 below).&amp;nbsp; However, if M03 is added, the table visual "explodes" to show a high number of rows that should not appear, as well as incorrect data.&amp;nbsp; (see screenshot 2 below)&lt;/P&gt;&lt;P&gt;NOTE 2: As you can see from the first screenshot, the slicer "ID-User" does NOT filter the table visual.&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;DESIRED RESULT: The first table visual (with 9 rows) should appear, and M03 should only show as 1 (or "True") for the Selected Users (in this case, only the rows where User = John).&amp;nbsp; The other 5 rows (Ed, Jane &amp;amp; Sarah) should show 0 (or "False") because they are not in the currently selected set of users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 23:04:50 GMT</pubDate>
    <dc:creator>WinterMist</dc:creator>
    <dc:date>2023-12-05T23:04:50Z</dc:date>
    <item>
      <title>CurrentUser vs SelectedUsers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3569424#M137617</link>
      <description>&lt;P&gt;Hello Community -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PBIX can be found here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1ilGCO8C9UYytxPUA_NOcff31Xh7lwN5K/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1ilGCO8C9UYytxPUA_NOcff31Xh7lwN5K/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 01 builds a concatenated list of selected User ID's from the slicer.&lt;/P&gt;&lt;P&gt;Measure 02 gets the current User ID in each row of the table visual.&lt;/P&gt;&lt;P&gt;Measure 03:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;- I can't get M03 to work.&amp;nbsp; But this is what it's supposed to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;- IF(M02 IN M01,&amp;nbsp;1, 0)&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE 1: Without M03 in the table visual,&amp;nbsp;9 rows are correctly displayed (see screenshot 1 below).&amp;nbsp; However, if M03 is added, the table visual "explodes" to show a high number of rows that should not appear, as well as incorrect data.&amp;nbsp; (see screenshot 2 below)&lt;/P&gt;&lt;P&gt;NOTE 2: As you can see from the first screenshot, the slicer "ID-User" does NOT filter the table visual.&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;DESIRED RESULT: The first table visual (with 9 rows) should appear, and M03 should only show as 1 (or "True") for the Selected Users (in this case, only the rows where User = John).&amp;nbsp; The other 5 rows (Ed, Jane &amp;amp; Sarah) should show 0 (or "False") because they are not in the currently selected set of users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 23:04:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3569424#M137617</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-12-05T23:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: CurrentUser vs SelectedUsers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3569768#M137630</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="340078" data-lia-user-login="WinterMist" class="lia-mention lia-mention-user"&gt;WinterMist&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Add two tables ,DO NOT create relationships.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;(1)Table&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = 
SUMMARIZE ( City, City[City ID], City[City Name], City[ID-City] )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2)Table 2&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = 
SUMMARIZE ( User, User[User ID], User[User Name], User[ID-User] )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Relationship&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;add new measure Table_City id &amp;amp; Table_ID-User&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Table_City id&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table_City id = 
VAR _1 =
    SELECTEDVALUE ( 'Table'[ID-City] )
VAR _2 =
    IF ( MAX ( City[ID-City] ) = _1, MAX ( Sales[City ID] ), BLANK () )
RETURN
    _2
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table_ID-User&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table_ID-User = 
VAR _1 =
    SELECTEDVALUE ( 'Table 2'[ID-User] )
VAR _2 =
    IF ( MAX ( User[ID-User] ) = _1, MAX ( User[User Name] ), BLANK () )
RETURN
    _1
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;final output&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;March or not = 
VAR _1 =
    CALCULATE (
        MAX ( User[User Name] ),
        FILTER ( ALL ( User ), User[ID-User] = [Table_ID-User] )
    )
RETURN
    IF ( [Table_City id] &amp;lt;&amp;gt; BLANK () &amp;amp;&amp;amp; MAX ( User[User Name] ) = _1, 1, 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.fabric.microsoft.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yifanw%40microsoft.com%7C385db312eca743b140b208dbf6194a11%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638374360717244535%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=hKDQVKviKMFgXT4w4h1OGey%2FYd5RIJjYpU7LiYXsN0s%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;Best Regards,&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;Yifan Wang&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, 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;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 05:17:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3569768#M137630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-06T05:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: CurrentUser vs SelectedUsers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3574968#M137831</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I really appreciate your time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This definitely solves the 1 exact scenario I gave.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, if I add even one additional value to the user slicer, then it breaks.&lt;/P&gt;&lt;P&gt;For instance, if I add User "3-Sarah", then all values for selected users incorrectly go to 0.&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;Additionally, if no slicer values are selected, then nothing appears in the table visual at all, which is also a problem.&lt;/P&gt;&lt;P&gt;(City slicer should still be filtering the table visual at all times, but it's not anymore now that the slicer is coming from a disconnected table.)&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;Please keep in mind&amp;nbsp;these slicers are &lt;EM&gt;multi-selection&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;This is the reason why I have measures which build concatenated lists of the selected values, described in the initial post (as well as in the PBIX).&lt;/P&gt;&lt;P&gt;I also noticed, that you removed the visual cards from the PBIX which display these selected values.&lt;/P&gt;&lt;P&gt;I guess that's fine if we don't display them in a card.&lt;/P&gt;&lt;P&gt;But the solution still needs to be able to see ALL selected values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: In the screenshot below, the output of the table visual is incorrect.&amp;nbsp; It should show the data from New York &amp;amp; Los Angeles, &lt;EM&gt;because those are the selected cities&lt;/EM&gt; which should define what appears in the table visual.&amp;nbsp; But also note that I have recreated the cards which hold the selected concatenated lists for each slicer. (&lt;EM&gt;multi&lt;/EM&gt;-selection lists).&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;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.&amp;nbsp; This solution seems incredibly complex for what I am trying to do.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I already have the User ID for each row ("02 Current User ID" shown below).&lt;/P&gt;&lt;P&gt;2) I already have the concatenated list of selected users ("01 Selected Users" shown below).&lt;/P&gt;&lt;P&gt;All I want is 1 more column that checks if #1 exists in #2.&lt;/P&gt;&lt;P&gt;Is it really necessary to create copies of existing tables to do this?&lt;/P&gt;&lt;P&gt;(Forgive my ignorance, but I would think this just needs the creation of 1 more DAX formula that I'm struggling to figure out.)&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>Fri, 08 Dec 2023 18:09:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CurrentUser-vs-SelectedUsers/m-p/3574968#M137831</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-12-08T18:09:07Z</dc:date>
    </item>
  </channel>
</rss>

