Forum Discussion
giovanni_figuei
4 years agoFrequent Visitor
Show a Text based on a Date
Hi. I need to show a text based on a Date but i can't think of a way to do that. Heres the situation: I have a ID code wich have a lifetime, based on this life time i want to display a text inform...
- 4 years ago
Hi, giovanni_figuei
Please check the following methods.
Measure = VAR N1 = SWITCH ( TRUE (), SELECTEDVALUE ( 'Table'[Date] ) >= DATE ( 2020, 4, 15 ) && SELECTEDVALUE ( 'Table'[Date] ) <= DATE ( 2022, 12, 31 ), "VALID", SELECTEDVALUE ( 'Table'[Date] ) < DATE ( 2020, 4, 15 ), "INVALID", SELECTEDVALUE ( 'Table'[Date] ) > DATE ( 2022, 12, 31 ), "INVALID" ) RETURN N1If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhangti
4 years agoCommunity Support
Hi, giovanni_figuei
Please check the following methods.
Measure =
VAR N1 =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table'[Date] ) >= DATE ( 2020, 4, 15 )
&& SELECTEDVALUE ( 'Table'[Date] ) <= DATE ( 2022, 12, 31 ), "VALID",
SELECTEDVALUE ( 'Table'[Date] ) < DATE ( 2020, 4, 15 ), "INVALID",
SELECTEDVALUE ( 'Table'[Date] ) > DATE ( 2022, 12, 31 ), "INVALID"
)
RETURN
N1
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
giovanni_figuei
4 years agoFrequent Visitor
Thank you so much helped me a lot S2