Forum Discussion
Calculate Text value based on date in another column
- 6 years ago
tmitton - Seems like:
Phase = SWITCH(TRUE(), [Date] <= DATE(2020,6,30),"Phase 1", [Date] > DATE(2020,6,30) && [Date] <= DATE(2020,9,30),"Phase 2", [Date] > DATE(2020,10,1) && [Date] <= DATE(2020,12,31),"Phase 3", "N/A" )
This returns the following error:
It had me remove one of the double "&" keys, and then told me that "SWTICH" is not recognized.
Thanks again for any guidance you can provide.
tmitton
You are supposed to use Greg_Deckler 's solution as a new column in your table in the Power BI Data Model. not in Power Query.
Select the table and
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
- Fowmy6 years agoSuper User
tmitton
Make sure your [Date/Time Due] is in Date format. The ERROR msg explains it.________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
- tmitton6 years agoFrequent Visitor
Thank you all!