Forum Discussion
lc1
7 years agoHelper III
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]),"Ope...
parry2k
7 years agoSuper User
lc1 try this
Response Time = IF(sr[source]="c", DATEDIFF(sr[receiveddate],sr[closingdate], DAY), "Open")
lc1
7 years agoHelper 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.
- parry2k7 years agoSuper User
lc1 Are you adding this as a measure or column? The dax I proposed suppose to be a column.
And you might run into another error, we are returning number but in else condition we are returning text, but let's see if we have add this expression as a column.
- lc17 years agoHelper III
It was as a calculated column, but I used the same formula adding a column and it gives me #ERROR