Forum Discussion
If Statement
Hello,
I need to create the following formula in DAX:
excel:
if (column 1="C", column 5-column 7, "Open"
PBI:
Response Time = IF(sr[source]="c", calculate (sr[receiveddate]-sr[closingdate]),"Open"))
Please advise how to do it, I tried many different ways but I keep getting a syntax error (invalid token, line 1, offset 30, 'sr[receiveddate]-sr[closingdate]),"Open")))))
lc1 can you try follownig, I'm shooting in dark without looking at data model.
Response Time = IF(sr[source]="c", DATEDIFF(sr[receiveddate],sr[closingdate], DAY))
Make sure to add as a column? And I assume datatype for both receivedate and closingdate is date.
8 Replies
- lc1Helper III
I get this error:
A single value for column 'receiveddate' in table 'sr' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.