Forum Discussion
Comparing dates in a table
In this scenario, you could use calculated column instead of measure. It will be much easier to achieve you logic. Just apply IF statement like:
Column =
1
* (
IF (
Table[Changed Date] <> BLANK (),
Table[Changed Date],
IF ( Table[Closed Date] <> BLANK (), Table[Closed Date], NOW () )
)
- Table[Open Date]
)
Regards,
Hi v-sihou-msft
I have tried a Column previously but had issues getting the right values, which is why I tried the Measure. However I have followed your advice and am now getting an error stating-
A single value for column 'BMCServiceDesk__Closed_Date_Time__c' in table 'problem' 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.
The DAX is-
ColumnDaysToNextValue = 1
* (
IF (
'History: Problem'[ChangedDate] <> BLANK (),
'History: Problem'[ChangedDate],
IF ('problem'[BMCServiceDesk__Closed_Date_Time__c] <> BLANK (), 'problem'[BMCServiceDesk__Closed_Date_Time__c], NOW () )
)
- 'problem'[BMCServiceDesk__Open_Date_Time__c]
)