Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Morning,
In my date table I'm trying to create a Custom column which list for between specific dates what season it is (Summer, Winter, etc). When I try to apply the custom column if function operation, I recieve the error:
Expression.Error: The Date operation failed because the resulting value falls outside the range of allowed values.
I've attached my pbix if anyone has any idea, my dates all line up so I'm not sure where I'm going wrong.
The date table is the only table and is titled "ExtendedCalendar" and the Custom Column under consideration is "Custom Two" in the applied steps or the "Season" column.
Link: https://1drv.ms/u/s!At8Q-ZbRnAj8hxgo1rirCX3x5CaM
Solved! Go to Solution.
Hi there, put this code into a Custom Column
if [Month Name] = "December" or [Month Name] = "January" or [Month Name] = "February" then "Summer" else if [Month Name] = "March" or [Month Name] = "April" or [Month Name] = "May" then "Autumn" else if [Month Name] = "June" or [Month Name] = "July" or [Month Name] = "August" then "Winter" else if [Month Name] = "September" or [Month Name] = "October" or [Month Name] = "November" then "Spring" else "NA"
This should work better because it does not take into account each year, so it will work on your entire date table.
Please guide , how to add new column for seasons name based on Month column, like summer, winter, autumn, and spring.
Hi Elliot, I think the error is caused by the sequence in your February date: YYYY-D-M instead of YYYY-M-D. please verify. cheers, Pawel
@pawel1thanks, I tried that and it didn't work.
@GilbertQyour solution is best for the moment, thank you very much (especially for the outside the box thinking).
@v-ljerr-msftSorry, busy times.
Hi there, put this code into a Custom Column
if [Month Name] = "December" or [Month Name] = "January" or [Month Name] = "February" then "Summer" else if [Month Name] = "March" or [Month Name] = "April" or [Month Name] = "May" then "Autumn" else if [Month Name] = "June" or [Month Name] = "July" or [Month Name] = "August" then "Winter" else if [Month Name] = "September" or [Month Name] = "October" or [Month Name] = "November" then "Spring" else "NA"
This should work better because it does not take into account each year, so it will work on your entire date table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |