Forum Discussion
old news
- 3 years ago
Hi,
Please find attached my PBI file.
Hope this helps.
- 3 years ago
Thank you so much
- 3 years ago
You are welcome.
- 3 years ago
Those have been subsumed into the single Date column. Study the transformation steps in the Query Editor carefully.
- 3 years ago
Thanks
Hi,
Please find attached my PBI file.
Hope this helps.
Quick question
What about the start and end date field? I didn't see it in the data table. I can't get the calculation done in the Power query
- Ashish_Mathur3 years ago
Super User
Those have been subsumed into the single Date column. Study the transformation steps in the Query Editor carefully.
- Olamum3 years ago
Helper II
Thanks
- Olamum3 years ago
Helper II
Hello ,
I'm not getting the right answer. Count of id in fiscal year is lower than carried over
transform editor
{"[spc_startdateserviceplan]", Date.StartOfMonth, Date.Type}
}
)),
#"Added Custom2" = Table.AddColumn(#"Added Custom1", "Calculated End of Month", each (
{
{"[spc_enddateserviceplan]", Date.EndOfMonth, Date.Type}
}
)),
#"Added Custom3" = Table.AddColumn(#"Added Custom2", "Month Span", each (12 * (Date.Year(Date.From([End date])) - Date.Year(Date.From([spc_startdateserviceplan]))))
+ (Date.Month(Date.From([End date])) - Date.Month(Date.From([spc_startdateserviceplan])))
+ (if Date.Day(Date.From([End date])) < Date.Day(Date.From([spc_startdateserviceplan]))
then -1
else 0
)
+ 1),
#"Added Custom4" = Table.AddColumn(#"Added Custom3", "Month List", each List.Numbers(1,
[Month Span])),
#"Replaced Errors" = Table.ReplaceErrorValues(#"Added Custom4", {{"Month List", null}}),
#"Expanded Month List" = Table.ExpandListColumn(#"Replaced Errors", "Month List"),
#"Changed Type2" = Table.TransformColumnTypes(#"Expanded Month List",{{"End date", type date}}),
#"Added Custom5" = Table.AddColumn(#"Changed Type2", "Date", each Date.StartOfMonth(Date.AddMonths(
[End date],
0 -[Month Span] + [Month List]
))),
#"Replaced Errors1" = Table.ReplaceErrorValues(#"Added Custom5", {{"Date", null}}),
#"Removed Columns" = Table.RemoveColumns(#"Replaced Errors1",{"spc_enddateserviceplan", "spc_startdateserviceplan", "End date", "Month Span", "Month List"}),
#"Changed Type3" = Table.TransformColumnTypes(#"Removed Columns",{{"Date", type date}})
in
#"Changed Type3"- Ashish_Mathur3 years ago
Super User
I do not know what mistake you are committing. As you can see, it works fine in my file. Please recheck thoroughly.