Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
IIF(Fields!Date.Value ="12/31/9999", "END",Fields!Date.Value)
Is is possible to create measure with above condition?As my source is tabular model, i can't use calculated column for above condition.
Solved! Go to Solution.
Hi @Anonymous ,
"END" is a Text string, while Fields!Date.Value is a Date type value. Measure doesn't support to return values with different data types. In your scenario, you could convert [Date] to Text with below DAX formula.
Measure = IF ( SELECTEDVALUE ( TableName[Date] ) = DATE ( 9999, 12, 31 ), "END", FORMAT ( TableName[Date], "" ) )
Alternatively, you could replace "END" with blank.
Measure = IF ( SELECTEDVALUE ( TableName[Date] ) = DATE ( 9999, 12, 31 ), BLANK(),
SELECTEDVALUE(TableName[Date])
)
Best regards,
Yuliana Gu
Hi @Anonymous ,
"END" is a Text string, while Fields!Date.Value is a Date type value. Measure doesn't support to return values with different data types. In your scenario, you could convert [Date] to Text with below DAX formula.
Measure = IF ( SELECTEDVALUE ( TableName[Date] ) = DATE ( 9999, 12, 31 ), "END", FORMAT ( TableName[Date], "" ) )
Alternatively, you could replace "END" with blank.
Measure = IF ( SELECTEDVALUE ( TableName[Date] ) = DATE ( 9999, 12, 31 ), BLANK(),
SELECTEDVALUE(TableName[Date])
)
Best regards,
Yuliana Gu
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |