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.
I have a date column that i need to create a new column based on it, the new column should show the next six months with saturday as the end day.
Hi @Anonymous ,
What does your data look like? If you want to generate a new column, the number of rows of the newly generated column must be the same as the original number, otherwise an error will occur.
Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?
Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Basically i wanted to know if there is a way to modify this logic to say return the next 6 months ending on a saturday
@Anonymous Maybe something like:
Column =
VAR __Today = TODAY()
VAR __SixMonths = EOMONTH( __Today, 6 )
VAR __Calendar =
ADDCOLUMNS(
CALENDAR( __Today, __SixMonths ),
"__WeekDay", WEEKDAY( [Date], 2 )
)
VAR __MaxDate = MAXX( FILTER( __Calendar, [__WeekDay] = 6 ), [Date] )
VAR __Result = FILTER( __Calendar, [Date] <= __MaxDate )
RETURN
__Result
I tried but getting this error
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
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 |