Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all,
I hope I'm not posting a topic that's already answered somewhere but I couldn't find it.
I'm trying to solve the following.
I have a list of findings, and columns telling me what the deadline for the finding is, and wether or not the finding has been validated.
If it is validated, the file shows a date stamp and if no validation has been done, the cell is blank.
What I'm trying to do, is to create a measure that will tell me how many validations are timely vs not timely.
To do that, I need an IF statement (I think) that says something like this:
OnTime = IF(
OR( 'table'[Deadline] = "blank", 'table'[Deadline] > 'table'[Validation date] ), "Timely", "Not Timely". )
If I make a measure like this, it tells me that the max argument for the OR function is 2, so I guess I'm misusing the function.
Can someone please help me with this? I'm fairly new to DAX and like to solve this!
Solved! Go to Solution.
hi @einrikr
try replace "," to ";"
or use simple statement like
OnTime = IF(
'table'[Deadline] = "blank" || 'table'[Deadline] > 'table'[Validation date] , "Timely", "Not Timely" )
and what the point "." in the end of your statement?
do not hesitate to give a kudo to useful posts and mark solutions as solution
HI @einrikr,
I'd like to suggest you extract current values and stored to variables, then you can compare them in OR function without that error messages.
Measure =
VAR _deadline =
MAX ( 'Table'[Deadline] )
VAR _validation =
MAX ( 'Table'[Validation date] )
RETURN
IF (
OR ( _deadline <> BLANK (), _deadline > _validation ),
"Timely",
"Not Timely"
)
Regards,
Xiaoxin Sheng
Try like
OnTime = IF( OR( isblank('table'[Deadline]) , 'table'[Deadline] > 'table'[Validation date] ), "Timely", "Not Timely")
OnTime = IF(isblank('table'[Deadline]) || 'table'[Deadline] > 'table'[Validation date] ), "Timely", "Not Timely")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
hi @einrikr
try replace "," to ";"
or use simple statement like
OnTime = IF(
'table'[Deadline] = "blank" || 'table'[Deadline] > 'table'[Validation date] , "Timely", "Not Timely" )
and what the point "." in the end of your statement?
do not hesitate to give a kudo to useful posts and mark solutions as solution
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |