Skip to content

Commit

Permalink
Add screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
charl-potgieter committed May 19, 2020
1 parent a8bad7e commit dd04398
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 30 deletions.
12 changes: 7 additions & 5 deletions PowerQueries/Journals.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,20 @@
ExpandedTables = Table.ExpandTableColumn(ExpandedListOfTables, "AddMultiTableCol",
{
"Debit Account Code and Description", "Credit Account Code and Description", "Jnl Description", "Base Amount Total For Month",
"Is recurring", "Monthly growth percentage", "Number of instances per month", "Randomise", "Random Variation around base"},
"Is recurring", "Annual growth percentage", "Number of instances per month", "Randomise", "Random Variation around base"},
{
"Debit Account Code and Description", "Credit Account Code and Description", "Jnl Description", "Base Amount Total For Month",
"Is recurring", "Monthly growth percentage", "Number of instances per month", "Randomise", "Random Variation around base"}),
"Is recurring", "Annual growth percentage", "Number of instances per month", "Randomise", "Random Variation around base"}),

//Calculate amount by adding random number factor and percentage growth
AddRandomAdjCol = Table.AddColumn(ExpandedTables, "Random Number Factor", each if [Randomise] then
1 + Number.RandomBetween(-[Random Variation around base], [Random Variation around base])
else
1,
type number),
AddGrowthAdjCol = Table.AddColumn(AddRandomAdjCol, "Growth Factor", each Number.Power(1 + [Monthly growth percentage], [Month Index]), type number),

AddMonthlyGrowthPercentage = Table.AddColumn(AddRandomAdjCol, "Monthly growth percentage", each fn_MonthlyFromAnnualisedPercentage([Annual growth percentage]),type number),
AddGrowthAdjCol = Table.AddColumn(AddMonthlyGrowthPercentage, "Growth Factor", each Number.Power(1 + [Monthly growth percentage], [Month Index]), type number),
AddAmountCol = Table.AddColumn(AddGrowthAdjCol, "Absolute Amount",
each Number.Round(
[Base Amount Total For Month] / [Number of instances per month] * [Random Number Factor] * [Growth Factor],
Expand All @@ -78,7 +80,7 @@
AddAccountCodeCol = Table.AddColumn(Combined, "Account Code", each Text.Start([Account Code and Description], param_NumberOfAccountDigits), type text),
SelectColsAndReorder = Table.SelectColumns(AddAccountCodeCol,{"EndOfMonth", "Jnl ID", "Account Code", "Jnl Description", "Jnl Amount"}),
ChangedType3 = Table.TransformColumnTypes(SelectColsAndReorder,{{"EndOfMonth", type date}, {"Jnl ID", type text}, {"Account Code", type text}, {"Jnl Description", type text}}),
#"Sorted Rows" = Table.Sort(ChangedType3,{{"EndOfMonth", Order.Ascending}, {"Jnl ID", Order.Ascending}})
SortedRows = Table.Sort(ChangedType3,{{"EndOfMonth", Order.Ascending}, {"Jnl ID", Order.Ascending}})

in
#"Sorted Rows"
SortedRows
6 changes: 0 additions & 6 deletions PowerQueries/TrialBalance.m
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ each fn_BsPortionOfTb(BufferedTransactions, [EndOfMonth]) &
fn_RetainedEarningsPortionOfTb(BufferedTransactions, [EndOfMonth]) &
fn_PandLPortionOfTb(BufferedTransactions, [EndOfMonth]),
type table),

/*
AddTbTable = Table.AddColumn(ChangedType, "TB as table",
each fn_BsPortionOfTb(BufferedTransactions, [EndOfMonth]),
type table),
*/

ExpandedTBTable = Table.ExpandTableColumn(AddTbTable, "TB as table", {"Account Code", "Amount"}, {"Account Code", "Amount"}),
ChangedType2 = Table.TransformColumnTypes(ExpandedTBTable,{{"Account Code", type text}, {"Amount", type number}})
Expand Down
5 changes: 5 additions & 0 deletions PowerQueries/fn_MonthlyFromAnnualisedPercentage.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(PercentageAnnuaised as number)=>
let
MonthlyPercentage = Number.Power((1 + PercentageAnnuaised), (1/12)) - 1
in
MonthlyPercentage
4 changes: 0 additions & 4 deletions PowerQueries/tbl_Journals.m

This file was deleted.

29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

## Installation

- TBA
- 'Mention something about download'
- Download latest release here: https://github.com/charl-potgieter/SampleFinancialDataGenerator/releases

- Alternatively recreate with the data in the SpreadsheetMetadata folder utilising the code in the following repository:
https://github.com/charl-potgieter/SpreadsheetCreator


## Output files generated
Expand All @@ -24,6 +26,29 @@
- Ad hoc once off journals
- Output is in the form of pipe delimited text files to enable easy reading by Excel or Power BI


## Screenshots

#### Index page
![Alt text](/Screenshots/Index.JPG?raw=true)

#### Parameters
![Alt text](/Screenshots/Parameters.JPG?raw=true)

#### Journal metadata
![Alt text](/Screenshots/JnlMetaData.JPG?raw=true)

#### Output chart of accounts
![Alt text](/Screenshots/ChartOfAccounts.JPG?raw=true)

#### Output journals
![Alt text](/Screenshots/Journals.JPG?raw=true)

#### Output Trial Balance
![Alt text](/Screenshots/TrialBalance.JPG?raw=true)



## License

### The MIT License
Expand Down
Binary file added Screenshots/ChartOfAccounts.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Index.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/JnlMetaData.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Journals.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Parameters.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/TrialBalance.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions SpreadsheetMetadata/ListObjectFieldValues.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions SpreadsheetMetadata/ListObjectFields.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SheetName|ListObjectName|ListObjectHeader|IsFormula|FormulaParameters|tbl_Parameters|Parameter|False|Parameters|tbl_Parameters|Comments|False|Parameters|tbl_Parameters|Value|False|ChartOfAccounts|tbl_InputChartOfAccounts|Account Code and Description|False|ChartOfAccounts|tbl_InputChartOfAccounts|Account Category 1|False|ChartOfAccounts|tbl_InputChartOfAccounts|Account Category 2|False|ChartOfAccounts|tbl_InputChartOfAccounts|Account Category 3|False|ChartOfAccounts|tbl_InputChartOfAccounts|Account Category 4|False|ChartOfAccounts|tbl_InputChartOfAccounts|Account Category 5|False|OpeningBalances|tbl_InputOpeningBalalances|Account Code and Description|False|OpeningBalances|tbl_InputOpeningBalalances|Amount|False|JnlMetaData|tbl_InputJnlMetaData|Jnl Prefix|False|JnlMetaData|tbl_InputJnlMetaData|Debit Account Code and Description|False|JnlMetaData|tbl_InputJnlMetaData|Credit Account Code and Description|False|JnlMetaData|tbl_InputJnlMetaData|Jnl Description|False|JnlMetaData|tbl_InputJnlMetaData|Base Amount Total For Month|False|JnlMetaData|tbl_InputJnlMetaData|Is recurring|False|JnlMetaData|tbl_InputJnlMetaData|Annual growth percentage|False|JnlMetaData|tbl_InputJnlMetaData|Number of instances per month|False|JnlMetaData|tbl_InputJnlMetaData|Randomise|False|JnlMetaData|tbl_InputJnlMetaData|Random Variation around base|False|AdHocJnls|tbl_InputAdHocJnls|EndOfMonth|False|AdHocJnls|tbl_InputAdHocJnls|Jnl ID|False|AdHocJnls|tbl_InputAdHocJnls|Account Code and Description|False|AdHocJnls|tbl_InputAdHocJnls|Jnl Description|False|AdHocJnls|tbl_InputAdHocJnls|Jnl Amount|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Code|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Description|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Code and Description|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Category 1|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Category 2|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Category 3|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Category 4|False|OutputChartOfAccounts|tbl_ChartOfAccounts|Account Category 5|False|OutputJournals|tbl_Journals|EndOfMonth|False|OutputJournals|tbl_Journals|Jnl ID|False|OutputJournals|tbl_Journals|Account Code|False|OutputJournals|tbl_Journals|Jnl Description|False|OutputJournals|tbl_Journals|Jnl Amount|False|OutputTB|tbl_TrialBalance|EndOfMonth|False|OutputTB|tbl_TrialBalance|Account Code|False|OutputTB|tbl_TrialBalance|Amount|False|
Expand Down
1 change: 1 addition & 0 deletions SpreadsheetMetadata/MetadataWorksheets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Name|Sheet Category|Sheet Header|Table Name|Number Of Table Columns|Number of Table Rows|Table top left cellParameters|Inputs|Parameters|tbl_Parameters|3|7|$B$10ChartOfAccounts|Inputs|Chart of Accounts|tbl_InputChartOfAccounts|6|38|$B$5OpeningBalances|Inputs|Opening Balances|tbl_InputOpeningBalalances|2|23|$B$6JnlMetaData|Inputs|Journal Metadata|tbl_InputJnlMetaData|10|5|$B$5AdHocJnls|Inputs|Ad Hoc Jnls|tbl_InputAdHocJnls|5|6|$B$5OutputChartOfAccounts|Outputs|Chart of Accounts Output|tbl_ChartOfAccounts|8|38|$B$5OutputJournals|Outputs|Journal Output|tbl_Journals|5|1659|$B$5OutputTB|Outputs|TB Output|tbl_TrialBalance|3|865|$B$5
Expand Down
13 changes: 0 additions & 13 deletions ToDo_SampleFinancialDataGenerator.txt

This file was deleted.

2 changes: 2 additions & 0 deletions VBA_Code/m020_FileUtilities.bas
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ Sub ExportTableToPipeDelimtedText(lo As ListObject)

If Left(lo.Name, 4) = "tbl_" Then
sFolderPathAndName = sFolderPath & Application.PathSeparator & Right(lo.Name, Len(lo.Name) - 4) & ".txt"
sFolderPathAndName = GetNextAvailableFileName(sFolderPathAndName)
Else
sFolderPathAndName = sFolderPath & Application.PathSeparator & lo.Name & ".txt"
sFolderPathAndName = GetNextAvailableFileName(sFolderPathAndName)
End If
ExportListObjectToPipeDelimtedText lo, sFolderPathAndName

Expand Down

0 comments on commit dd04398

Please sign in to comment.