The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello all, I am trying to pass multiple tests that return "yes." The first test is to see if an employees last pay day is greater than 21 days, the second is to test wether their last pay date is blank and if so, return yes if their hire date is greater than 21 days from today.
Here is what I have so far:
Solved! Go to Solution.
Please try
Active No Hours =
IF (
DATEDIFF ( 'ADP Active Employees'[Last Pay Date], TODAY (), DAY ) > 21
|| AND (
ISBLANK ( 'ADP Active Employees'[Last Pay Date] ),
DATEDIFF ( 'ADP Active Employees'[Last Pay Date], TODAY (), DAY ) > 21
),
"Yes"
)
Hi @james_pease
please try
Active No Hours =
IF (
DATEDIFF ( 'ADP Active Employees'[Last Pay Date], TODAY (), DAY ) > 21
|| AND (
LEN ( 'ADP Active Employees'[Last Pay Date] ) < 0,
DATEDIFF ( 'ADP Active Employees'[Last Pay Date], TODAY (), DAY ) > 21
),
"Yes"
)
Thank you, but for some reason its not reutrning the employees with an blank last pay date (empty cell). Its passing the first arguement fine, but for some reason, its not testing if the last pay date is blank, then return yes if hire date is > than 21 days from today.
Here is a screenshot, I blacked out names for privacy. Notice how it is not returing a "yes" for those without a last pay date and their hire date is > today + 21 days?
AHHH so sorry, I needed to change the second clause to
DATEDIFF ( 'ADP Active Employees'[Hire/Rehire Date], TODAY (), DAY ) > 21
Works like a charm!
Please try
Active No Hours =
IF (
DATEDIFF ( 'ADP Active Employees'[Last Pay Date], TODAY (), DAY ) > 21
|| AND (
ISBLANK ( 'ADP Active Employees'[Last Pay Date] ),
DATEDIFF ( 'ADP Active Employees'[Last Pay Date], TODAY (), DAY ) > 21
),
"Yes"
)
Sadly, same result:
Notice how there are 1501 blanks, I am expecting several to say "yes" in the 'Active No Hours column'
I have also tried the following:
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
10 | |
10 | |
9 |