Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Guys, I would like to get the date difference between Last Logon and Last Password Reset columns and the display a warning or text that the user hasn't reset their password in x amount of days.
This is what I am using now but does not display the correct information:
Measure =
VAR Created =
MAX ( user[user.lastLogon].[Year])
VAR Closed =
MAX ( user[user.pwdLastSet].[Year] )
VAR NoOfDays =
IF (
Closed > Created,
DATEDIFF ( Created, Closed, YEAR),
DATEDIFF ( Closed, Created, YEAR)
)
RETURN
IF ( NoOfDays >= 1, "User account Fine", "Password Needs to be Reset )
Hi @KeithKing
try the same but without .[Year] in Created and Closed variables
That should be enough
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi,
It sort of works now 🙂 but the problem is that I have an account CustomerCare1 with last logon at 2019/12/06 and last password reset at 2019/08/02. This is a 4 month difference but it says the user account is fine? It needs to check the year as well as months (3 months after that password needs to be reset)
Hope I am making sense?
Thanks
DATEDIFF ( Created, Closed, MONTH) will give you difference in monthes without any dependencies of Year
For example
DATEDIFF ( DATE(2019,11,1), DATE(2020,1,11), MONTH) will return you 2 month difference
do not hesitate to give a kudo to useful posts and mark solutions as solution
Thanks!!
does it work ok?
do not hesitate to give a kudo to useful posts and mark solutions as solution
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
12 | |
11 | |
8 | |
8 |
User | Count |
---|---|
24 | |
13 | |
12 | |
11 | |
10 |