Forum Discussion
christinaxxx
2 years agoHelper I
Getting wrong quarter in the date table
I have a calendar function for generating date table in Power Query: = (StartDate as date, EndDate as date, FYStartMonth as number) as table =>
let
DayCount = Duration.Days(Duration.From(EndD...
- 2 years ago
You are welcome! ๐
Yes you have to add it. You can use the same code but you have to change "shortyear" to "QuarterOfYear"AddFY = Table.AddColumn(InsertShortYear, "FY", each "FY"&(if [MonthOfYear]>=FYStartMonth then Text.From(Number.From([ShortYear])+1) else [ShortYear]))
--> like something like this.
AddFY = Table.AddColumn(InsertShortYear, "FY", each "FY"&(if [MonthOfYear]>=FYStartMonth then Text.From(Number.From([QuarterOfYear])+1) else [QuarterOfYear]))
Let me know if you need more help.
andhiii079845
2 years agoSolution Sage
You are welcome! ๐
Yes you have to add it. You can use the same code but you have to change "shortyear" to "QuarterOfYear"
AddFY = Table.AddColumn(InsertShortYear, "FY", each "FY"&(if [MonthOfYear]>=FYStartMonth then Text.From(Number.From([ShortYear])+1) else [ShortYear]))
--> like something like this.
AddFY = Table.AddColumn(InsertShortYear, "FY", each "FY"&(if [MonthOfYear]>=FYStartMonth then Text.From(Number.From([QuarterOfYear])+1) else [QuarterOfYear]))
Let me know if you need more help.