Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I don't know if this requires a total rewrite but having difficulty getting the count of AD_Account_Name to not include NULL's from the below. Does anyone have any tips?
Count (distinct (if([AD_LastLogonTimestamp.autoCalendar.Date] < Today()-90,AD_Account_Name)))
Thanks
Patrick
Hi,
Try below code -
IF(not isnull(AD_Account_Name), Count (distinct (if([AD_LastLogonTimestamp.autoCalendar.Date] < Today()-90,AD_Account_Name))))
Thanks
OR
Count (distinct (if([AD_LastLogonTimestamp.autoCalendar.Date] < Today()-90 and not isnull(AD_Account_Name) ,AD_Account_Name)))
Thanks
I would recommend:
=Count(DISTINCT
{<
AD_Account_Name = {"<>"}
,[AD_LastLogonTimestamp.autoCalendar.Date]={"<=$(=Date(Today()-90)"}
>}
AD_Account_Name)
Nomrally, count() will ignore nulls. Your expression has an unusual structure. Move the parentheses and the distinct:
Count (distinct (if([AD_LastLogonTimestamp.autoCalendar.Date] < Today()-90,AD_Account_Name)))
to
Count (If(AD_LastLogonTimestamp.autoCalendar.Date < Today()-90, distinct AD_Account_Name))
or
Count ({<AD_LastLogonTimestamp.autoCalendar.Date = {"<$(=Date(Today()-90))"}>} distinct AD_Account_Name))
Hey Patrick, did any of the replies help you get things sorted, if so, be sure to use the Accept as Solution button to give any of them credit that did help. If you are still trying to figure things out, leave a new post.
Only additional thing I have is a Design Blog post that might help:
https://community.qlik.com/t5/Qlik-Design-Blog/Finding-NULL/ba-p/1474279
Regards,
Brett