Forum Discussion
manindes
6 years agoRegular Visitor
Calendar Filter
Hello.., if we have scenario like i have 3 years data.in that i want dates in single column like first year jan -nov,second year feb-oct,third year march-spt.. Thank you
- Anonymous6 years ago
Hi manindes ,
Create a new Column
New Column = Var __month = Month(Dates[Date]) Var __year = YEAR(Dates[Date]) RETURN SWITCH( TRUE(), __year = 2015 && __month >=1 && __month <=11, "Jan - Nov" & " " & __year, __year = 2016 && __month >=2 && __month <=10, "Feb - Oct" & " " & __year, __year = 2017 && __month >=3 && __month <=9, "March - Sep" & " " & __year )Replace the 3 years with the years in ypur data.
Regards,
Harsh Nathani
Anonymous
6 years agoNot applicable
Hi manindes ,
A typo mistake.
Try this
New Column =
Var __month = FORMAT(Dates[Date], "mmm")
Var __year = YEAR(Dates[Date])
RETURN
__month & " " & __year
Regards,
Harsh Nathani
manindes
6 years agoRegular Visitor
thanks it's working but am looking like in above data
i have 3 years data.in that i want dates in single column like first year jan -nov,second year feb-oct,third year march-spt..
- Anonymous6 years agoNot applicable
Hi manindes ,
Create a new Column
New Column = Var __month = Month(Dates[Date]) Var __year = YEAR(Dates[Date]) RETURN SWITCH( TRUE(), __year = 2015 && __month >=1 && __month <=11, "Jan - Nov" & " " & __year, __year = 2016 && __month >=2 && __month <=10, "Feb - Oct" & " " & __year, __year = 2017 && __month >=3 && __month <=9, "March - Sep" & " " & __year )Replace the 3 years with the years in ypur data.
Regards,
Harsh Nathani