<?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: How to show all user ids which were NOT active during a sliced date range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900596#M94459</link>
    <description>&lt;P&gt;I do, I haven't used it so far as I've been using the date value in table 2.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 16:20:00 GMT</pubDate>
    <dc:creator>WhoCares535454</dc:creator>
    <dc:date>2022-11-11T16:20:00Z</dc:date>
    <item>
      <title>How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900183#M94428</link>
      <description>&lt;P&gt;Hi there. I have some data, centred around two tables.&lt;BR /&gt;&lt;BR /&gt;Table 1 is a list of all users, complete with distinct user ids, names and other data.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;User ID&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;628346&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;057378&lt;/TD&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202674&lt;/TD&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2 is a list of every time users accessed a system, including their user ID, the date they accessed the system, and other data&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;User ID&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;057378&lt;/TD&gt;&lt;TD&gt;10/11/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;057378&lt;/TD&gt;&lt;TD&gt;11/11/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202674&lt;/TD&gt;&lt;TD&gt;11/11/2022&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my visuals, I have a nice table showing a list of all users who accessed the system, and a date slicer (using the date field on table 2) allowing this to be filtered to only show users who accessed the system during certain date ranges. It works fine. What I want is the opposite: another table on the same page, which shows all users who have &lt;EM&gt;not&amp;nbsp;&lt;/EM&gt;accessed the system during the filtered date range. This would include all users who have never&amp;nbsp;accessed the system, plus all those who have accessed it, but not during the filtered date range.&lt;BR /&gt;&lt;BR /&gt;I've tried doing a simple "does not appear on table 2" filter, but that just means that as soon as we start slicing by date, the table goes blank. The closest I've had to success with this is the measure below, which returns the count of user IDs which&amp;nbsp;&lt;EM&gt;don't&lt;/EM&gt;&amp;nbsp;appear. If I apply that as a filter to the table ([Users with no usage] &amp;gt;0), it appears to work, but it takes so long to run every time I change the date slicer that it usually times out. I think it's taking a long time because it's creating the entire table for every user id, deleting it, then doing it again for the next user id.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;[Users with no usage] =&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculate(&lt;BR /&gt;count(table1[user id]),&lt;/P&gt;&lt;P&gt;except(&lt;/P&gt;&lt;P&gt;allselected(table2[date]),&lt;/P&gt;&lt;P&gt;values(table2[date])&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried getting the measure to create a table using calculatetable() instead of calculate(count()) but visuals refuse to display it, saying that a table of multiple values was supplied where one value was expected. I'm stuck. Can anyone help?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 14:59:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900183#M94428</guid>
      <dc:creator>WhoCares535454</dc:creator>
      <dc:date>2022-11-11T14:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900301#M94442</link>
      <description>&lt;P&gt;Not sure if this is what you expect:&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;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NotSelected = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_Table&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;EXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CONCATENATEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;_Table&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ASC&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW,&amp;nbsp; in your code, COUNT returns a value not a list/table.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 13:33:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900301#M94442</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-11-11T13:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900366#M94447</link>
      <description>&lt;P&gt;Thanks, but that's not really what I want. Displaying the users in a single string wouldn't work, as there are several thousand users in total. What I want is to return a table which displays all users (on separate rows) who have not been active in the set date range according to my slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for example let's say I have the numbers 1-30 as the different user ids (pic 1), and every day some of them log onto the system (pic 2).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to see is something like pic 3: the slicer lets me select a date range, and then the table next to it displays a list of all user ids who did&amp;nbsp;&lt;EM&gt;not&amp;nbsp;&lt;/EM&gt;log onto the system during this date range. Is that helpful?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm aware count returns a value. I've tried getting the measure to return a table with calculatetable instead of count, but whenever I try to display the measure I get told "a table of multiple values was supplied where one value was expected).&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 14:01:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900366#M94447</guid>
      <dc:creator>WhoCares535454</dc:creator>
      <dc:date>2022-11-11T14:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900535#M94453</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="422411" data-lia-user-login="WhoCares535454" class="lia-mention lia-mention-user"&gt;WhoCares535454&lt;/a&gt;&amp;nbsp; please try the below code :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Inactive = 
VAR _mindate =
    MIN ( 'Table2'[Date] )
VAR _maxdate =
    MAX ( 'Table2'[Date] )
VAR _activetbl =
    FILTER (
        'Table2',
        'Table2'[Date] &amp;gt;= _mindate
            &amp;amp;&amp;amp; Table2[Date] &amp;lt;= _maxdate
    )
VAR _actuser =
    SELECTCOLUMNS (
        _activetbl,
        "@user", [User ID]
    )
VAR _user =
    VALUES ( Table1[User ID] )
VAR _inactive =
    EXCEPT (
        _user,
        _actuser
    )
RETURN
    COUNTROWS ( _inactive )&lt;/LI-CODE&gt;&lt;P&gt;put the measure into the filter of the matrix&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 15:40:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900535#M94453</guid>
      <dc:creator>zerotyper</dc:creator>
      <dc:date>2022-11-11T15:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900569#M94457</link>
      <description>&lt;P&gt;Hi, thanks for this. I'm afraid when I try using this code, setting the filter, and then selecting a date range with the slicer, the table goes completely blank, with no results displayed. If no date range is selected with the slicer (i.e. all dates are selected) it seems to work, but as soon as the dates are filtered it goes completely blank. I don't suppose you have any idea what's going wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 16:02:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900569#M94457</guid>
      <dc:creator>WhoCares535454</dc:creator>
      <dc:date>2022-11-11T16:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900584#M94458</link>
      <description>&lt;P&gt;Do you have a date dimension table?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 16:12:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900584#M94458</guid>
      <dc:creator>zerotyper</dc:creator>
      <dc:date>2022-11-11T16:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900596#M94459</link>
      <description>&lt;P&gt;I do, I haven't used it so far as I've been using the date value in table 2.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 16:20:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900596#M94459</guid>
      <dc:creator>WhoCares535454</dc:creator>
      <dc:date>2022-11-11T16:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900621#M94462</link>
      <description>&lt;P&gt;In my file, even&amp;nbsp;&lt;SPAN&gt;selecting a date range with the slicer, also works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Would you please share your file, so that can find out the reason?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 16:33:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900621#M94462</guid>
      <dc:creator>zerotyper</dc:creator>
      <dc:date>2022-11-11T16:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900787#M94468</link>
      <description>&lt;P&gt;Sorry, I can't share the file itself due to security reasons. However, I have figured out what's causing it to go blank: I have a relationship between table1 and table2. It's a one to many relationship going both ways. When I slice the visual (using table1 data) by the date range (using table2 data), it tries to only return the data which only appears in that date range, and also only the data that doesn't appear in the date range at all. The result is it returns no data. If I deactivate the relationship, it works perfectly. I could keep the relationship inactive and just transplant all of my table1 data to table2 using lookupvaluecolumns, but I don't suppose there's a way to keep the relationship active? Thanks a lot for your help, just having the measure is very useful.&lt;BR /&gt;&lt;BR /&gt;Edit: Update, it works so long as the relationship is only one way (from table1 to table2), which I think I can probably work with. Thanks a lot for all your help.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 18:20:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2900787#M94468</guid>
      <dc:creator>WhoCares535454</dc:creator>
      <dc:date>2022-11-11T18:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to show all user ids which were NOT active during a sliced date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2901191#M94496</link>
      <description>&lt;P&gt;The result you expect is a table, be it calculated table or visual table.&lt;/P&gt;&lt;P&gt;1) A calculated column or table can't reflect a slicer change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) There might be ways to write some measure to build a visual table for your case. I am not so sure how.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 03:40:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-show-all-user-ids-which-were-NOT-active-during-a-sliced/m-p/2901191#M94496</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-11-12T03:40:32Z</dc:date>
    </item>
  </channel>
</rss>

