Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have a data set where one ofthe columns is created_date(mm/dd/yyyy). I want to create another column where if the created_date is before 04/10 it populates "Historic" otherwise it populates the month and year from the created_date column.
Is it possible to do it?
Any help on this is much appreciated.
Solved! Go to Solution.
Hi @Anonymous ,
You are creating a column in Power Query while the above code is in DAX, this is the reson you are getting the error RightParen expected.
Incase you want to do it in M Language or Power Query
Column = if [Date] < #date(2020, 4, 20) then "Historic" else (Date.MonthName([Date]) & " " & Text.From(Date.Year([Date]))))
Replace [Date] --> with Created_Date
In DAX
Thanks for your response! However, this doesnt seem to work . It shows an error RightParen expected.
HI @Anonymous
Us teh below code
IF(table([CREATED_DATE])<DATE(2020,04,10),"Historic", FORMAT([CREATED_DATE],"MM/YYYY"))
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		Hi @Anonymous ,
You are creating a column in Power Query while the above code is in DAX, this is the reson you are getting the error RightParen expected.
Incase you want to do it in M Language or Power Query
Column = if [Date] < #date(2020, 4, 20) then "Historic" else (Date.MonthName([Date]) & " " & Text.From(Date.Year([Date]))))
Replace [Date] --> with Created_Date
In DAX
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.