# Tags
**Software** : [[02 - Tags/Software/Power Query]]
**Functions** used : [[Table.AddColumn]] [[List.Transform]] [[Date.ToText]] [[Table.ExpandTableColumn]] [[Table.Sort]] [[Date.From]] [[Excel.CurrentWorkbook]]
**Date** : 16-March-2025
# Description
Seeing that its the end of the year and budgets need to be calculated once more in this video i show you how to generate Monthly Budgets from annual Figures
# Video Link
<iframe width="560" height="315" src="https://www.youtube.com/embed/HKYRw6N46-I?si=FHDDDpyMCpPZg00B" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
[GITHUB File Link](https://github.com/jbotes/powerbiTutorials/blob/main/PQ_Budget_Video.xlsx)
# M-Query
```mquery 1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "MonthlyDate", (MainTable)=> List.Transform({1..12}, (MonthList)=> Date.ToText(#date(MainTable[Year],MonthList,1),"MMM yyyy")), type {text}),
#"Expanded MonthlyDate" = Table.ExpandListColumn(#"Added Custom", "MonthlyDate"),
#"Divided Column" = Table.TransformColumns(#"Expanded MonthlyDate", {{"Budget Amount", each _ / 12, type number}}),
#"Sorted Rows" = Table.Sort(#"Divided Column",{{"Product Name", Order.Ascending}, {each Date.From([MonthlyDate]), Order.Ascending}})
in
#"Sorted Rows"
```
## Optional Tags
**Tags** :
**Technique** : [[Generate List Dates]] [[Inner Outer Tables]]