I've a list of users and the all dates when they're logged on. Example below:
User ID | Login date (MM/DD/YYYY) |
1 | 09/30/2020 |
1 | 10/02/2020 |
1 | 10/03/2020 |
1 | 10/04/2020 |
2 | 10/05/2020 |
2 | 10/06/2020 |
3 | 09/30/2020 |
I've also a list with 3 users in it named A, B and C with respectively IDs 1, 2 and 3. Now I want a list with all users that haven't signed on in september. The result of that list must only be user with ID 2. That filter must be depended on a slicer in the report itself. So if the user select october, the result must only be user with ID 3.
How could I do that?
Solved! Go to Solution.
Hi @HPauwelyn
You may try my way build a Calendar as a Slicer and build a Measure.
Slicer = CALENDARAUTO()
Measure =
Var _Sel = SELECTEDVALUE ( Slicer[Date].[MonthNo] )
VAR _A =
CALCULATE (
MAX ( 'Table'[User ID] ),
FILTER (
'Table',
'Table'[Login date (MM/DD/YYYY)].[MonthNo]
= _Sel
)
)
RETURN
IF ( _A = BLANK (), 1, 0 )
Build a table visual by ID column and drag Measure into Filter set showing items when the value equal to 1.
Result is as below.
You can download the pbix file from this link: Show items in a list that are not listed in a table
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@HPauwelyn , Assuming sep is last month with time intelligence and date calendar
last = if( isblank(CALCULATE(count(Table[user ID]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))),1, blank())
Plot this iwth user id you will get the result
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Appreciate your Kudos.
It didn't work when the month is august or earlier. I also need that data and it's not 100% trustworthy.
Hi @HPauwelyn
You may try my way build a Calendar as a Slicer and build a Measure.
Slicer = CALENDARAUTO()
Measure =
Var _Sel = SELECTEDVALUE ( Slicer[Date].[MonthNo] )
VAR _A =
CALCULATE (
MAX ( 'Table'[User ID] ),
FILTER (
'Table',
'Table'[Login date (MM/DD/YYYY)].[MonthNo]
= _Sel
)
)
RETURN
IF ( _A = BLANK (), 1, 0 )
Build a table visual by ID column and drag Measure into Filter set showing items when the value equal to 1.
Result is as below.
You can download the pbix file from this link: Show items in a list that are not listed in a table
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.