Forum Discussion
Create a column that returns a value between dates
- 5 years ago
Anonymous try something like this:
Gen Column = VAR __date = YourTable[YourDate] RETURN SWITCH ( TRUE(), __date >= DATE ( 2027,1, 1 ) && __date <= DATE ( 2037,12, 31 ), "Gen 1", __date >= DATE ( 2038,1, 1 ) && __date <= DATE ( 2048,12, 31 ), "Gen 2", "Gen other" )✨ Follow us on LinkedIn
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- 5 years ago
Anonymous it should be something like this:
Gen Column = VAR __year = YourTable[YourYearColumn] ) RETURN SWITCH ( TRUE(), __year >= 2001, "Gold", __year >= 1977, "Silver", __year >= 1962, "Bronze", "Others" )✨ Follow us on LinkedIn
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Anonymous it should be something like this:
Gen Column =
VAR __year = YourTable[YourYearColumn] )
RETURN
SWITCH ( TRUE(),
__year >= 2001, "Gold",
__year >= 1977, "Silver",
__year >= 1962, "Bronze",
"Others"
)
✨ Follow us on LinkedIn
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Once again, thank you!!!!