Forum Discussion
Code to show case active when there is a future date
- Anonymous3 years ago
Hi inglexjc ,
Please try to create a new column with below dax formula:
Column = VAR _a = IF ( ISBLANK ( [Date] ), 0, [Date] ) VAR _b = SWITCH ( TRUE (), _a = 0, "Active", NOT ( ISBLANK ( [Date] ) ) && [Date] > TODAY (), "Active", FORMAT ( [Date], "short date" ) ) RETURN _bPlease refer the attached .pbxi file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi inglexjc ,
Please try to create a new column with below dax formula:
End of Service Date/Open =
VAR _a =
IF (
ISBLANK ( PBI_TR_Placements_OOH[SERVICE_END_DATE] ),
0,
PBI_TR_Placements_OOH[SERVICE_END_DATE]
)
VAR _b =
SWITCH (
TRUE (),
_a = 0, "Active",
PBI_TR_Placements_OOH[SERVICE_END_DATE] > TODAY (), "Active",
PBI_TR_Placements_OOH[SERVICE_END_DATE], FORMAT ( PBI_TR_Placements_OOH[SERVICE_END_DATE], "Short Date" )
)
RETURN
_b
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Thank you for your response. I do get an error with this though:
- Anonymous3 years agoNot applicable
Hi inglexjc ,
Please try to create a new column with below dax formula:
Column = VAR _a = IF ( ISBLANK ( [Date] ), 0, [Date] ) VAR _b = SWITCH ( TRUE (), _a = 0, "Active", NOT ( ISBLANK ( [Date] ) ) && [Date] > TODAY (), "Active", FORMAT ( [Date], "short date" ) ) RETURN _bPlease refer the attached .pbxi file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.