Financial reporting on Power BI
Given an Excel file that contains financial data the goal is to create a report that shows a Profit & Loss statement and include information about the following Key Performance Indicators (KPI’s):
Also is needed to create two charts:
The first step is to organize the whole project into different steps that will be:
Understanding Data:
The Excel file shows several sheets that were exported from the ERP software, the ones that I will use for this project are:
GL: In the context of ERP (Enterprise Resource Planning) software, a "GL table" typically refers to the General Ledger table. The General Ledger is a core component of the accounting system, and the GL table specifically plays a crucial role in managing financial transactions. Here's an overview of the use and significance of the General Ledger table in an ERP system:
In summary, the GL table in an ERP system is the backbone of the accounting module, capturing, organizing, and maintaining the financial transactions of an organization. Its role extends beyond transaction recording to supporting financial reporting, compliance, and strategic decision-making.
Chart of accounts: a Chart of Accounts (COA) is a structured listing of the general ledger accounts used by an organization to record its financial transactions. The COA serves several essential purposes in the project:
In summary, the Chart of Accounts is a foundational element of financial reporting that brings structure and organization to the recording and reporting of financial transactions. It plays a key role in standardization, analysis, and compliance within the financial reporting project.
Calendar: In the context of a financial reporting project, a calendar table serves as a crucial component for time-based analysis and reporting. The calendar table is typically a dimension table that includes information about dates, such as day, month, quarter, and year. Its primary uses in the project include:
In summary, the calendar table is a foundational element that enhances the temporal aspects of financial reporting, offering flexibility, consistency, and powerful analytical capabilities.
Territory: I will import this table to make a Slicer in the report so data can be filtered by Country or Region.
Import to Power BI / create the model:
Once we have the data selected it’s time to send it to Power BI using the Get Data / Excel Workbook option. As said, we will be working with Calendar, GL, Chart of Accounts and Territory sheets, so these tables will be imported to the project.
I will not use the rest of the Excel Sheets since are not useful to the requirements of the project.
Once the tables are imported it is time to define the model, in this case I will use One to Many relationships between Calendar and GL, Date to GL, Territory to GL and Chart of Account to GL as well.
A one-to-many relationship model is a type of database relationship in which a single record in one table can be associated with multiple records in another table, but each record in the second table is related to only one record in the first table. This type of relationship is commonly represented in relational database systems and is fundamental to organizing and structuring data. The key characteristics of a one-to-many relationship model include:
In a visual representation, the relationship is depicted with a line connecting the primary key on the "one" side to the foreign key on the "many" side. This model is a fundamental concept in relational databases and plays a crucial role in maintaining data integrity and structure.
Format Data and create KPI’s using DAX:
Now that we have imported data and the model is properly created it is time to cleanse and preprocess the data before we can create the report. This sequencing is a common and sound approach in the data analysis process. It ensures that you are working with clean, well-organized data, which is essential for accurate and meaningful reporting.
We start to format the data as we need. Typically, when you import data from external sources, Power BI makes some auto formatting adjustments to recognize and interpret the data types of the fields, such as converting date, number formats, summarizing, ensuring that the information is appropriately structured for analysis and visualization within the Power BI environment. But often, these changes are not necessarily needed so we have to make some adjustments.
In this case we can see that in GL table, two key columns are showed as summarized. The sum method is applied to column data when you can see the Sigma symbol used to denote summarization at the left of the column name. This is not what we want since it are key values and I don’t need it to be summarized, also we can see that the Date column appears with a long format with Day and Month named with letters, I want to view it as a short Date format, so I must change it as well.
To avoid sum of the key columns we must change its properties, I can click on the column name (i.e. Territory Key) and then change on the summarization properties just select “Don’t summarize” value. The sigma symbol will disappear from the column name.
Changing the format Date is also a simple task that we can do just by clicking on the Date column and changing the format in the Column tools bar to “Short Date” as shown in the following image.
We must repeat the same task for all needed columns in all the tables we have imported, this will ensure that we will have appropriate data for making the necessary reports without having any data issues.
Once I have finished the data preparation process, it is time to create the KPI’s needed to show in the report. I am going to show each KPI in a single table detailing it by year, since I have only 2018, 2019 and 2020 data I will create each table showing the three years value for each metric like the following image for Gross Profit.
I have to create the following KPI’s using the corresponding formula:
This can be done by filtering data by the corresponding financial account after creating the table or by using DAX to create calculated measures that specifically target the desired metrics. Using DAX gives you a dynamic and flexible way to calculate and display key performance indicators (KPIs) by leveraging the data model. This allows for real-time adjustments and better responsiveness to changes in the underlying financial data, so it will be the method I will use to create the metrics. The “CALCULATE” DAX statement is useful because I can filter the data I need in each metric by the Financial Account, for reference I use the Chart of Accounts table that tells me if the Account I am looking for is in the Class, SubClass, Subclass2 or Account level.
For example, If I need to calculate the SalesTTD I look forward in the Chart of Accounts table to find where the “Sales” Account is and see that it can be found in the “Subclass” column of the table as shown below.
So, the SalesTTD formula will look like this:
SalesTTD = CALCULATE([Total_FTP], 'Chart of Accounts'[SubClass] = "Sales")
But the first step to make the whole calculations is to create the TotalFTP measure, this will be the base measure that I will be using for creating other measurements, the TotalFTP measure is the summarization of all the amounts in GL table for all Financial Accounts, so our first measure will be in this case, TotalFTP.
Total_FTP = SUM('GL'[Amount])
Next, I can create the other measures as well.
SalesTTD = CALCULATE([Total_FTP], 'Chart of Accounts'[SubClass] = "Sales")
Gross Profit = CALCULATE([Total_FTP], 'Chart of Accounts'[Class] = "Trading account")
Trading Account = CALCULATE([Total_FTP], 'Chart of Accounts'[Class] = "Trading account")
Operating Account = CALCULATE([Total_FTP], 'Chart of Accounts'[Class] = "Operating account")
Operating Profit = [Trading Account] + [Operating Account]
Non-Operating = CALCULATE([Total_FTP], 'Chart of Accounts'[Class] ="Non-operating")
PBIT = [Operating Profit] + [Non-Operating]
Interest and Tax = CALCULATE([Total_FTP], 'Chart of Accounts'[Class] = "Interest & Tax")
Net Profit = [PBIT] + [Interest and Tax]
Recommended by LinkedIn
EBITDA = CALCULATE([Total_FTP], 'Chart of Accounts'[SubClass] = "Sales") + CALCULATE([Total_FTP], 'Chart of Accounts'[SubClass] = "Cost of Sales") + CALCULATE([Total_FTP], 'Chart of Accounts'[SubClass] = "Operating Expenses")
GPMargin = [Gross Profit] / [SalesFTP]
NPMargin = [Net Profit] / [SalesFTP]
Create visuals:
Once we have the data prepared and all measures created it’s time to make the visuals for the report. Since the data is already in shape all the following work will be like Drag & Drop tasks.
I start creating two slicers that will be used to filter data by Year and Country.
Next it comes the Profit & Loss Statement, this will be a Matrix Visual with the following content:
Rows: Created a hierarchy of Class, SubClass, SubClass2 and Account so that the user can expand or contract the content in each Financial Account to have a detailed or summarized view, providing with a more granular analysis of the data as needed.
Columns: Created a hierarchy of Year, Quarter, Month and Day so the user can dynamically analyze the data over different time periods, facilitating trend analysis, and enabling identification of patterns or seasonality in the data.
Values: In this case we have two options. The first is to drag the Amount field on GL table and let it summarize all values, providing us with the Total For The Period. However, since I’ve made all the measures using DAX, I will make use of them.
Next, I will create the rest of the metrics, all based on the recently created P&L Matrix Visual, so for all cases it will be a Copy / Paste of this Matrix.
The changes we have to make for the new visuals are:
Gross Profit:
Gross Profit Margin:
Net Profit:
Net Profit Margin:
EBITDA (Earnings Before Interest & Tax, Depreciation and Amortization):
PBIT (Profit Before Interest & Tax):
SalesFTP (Full Time Period): For this metric I will use the KPI Visual, that gives me a more accurate view of the data since I can see the amount but also I have an area chart behind that shows the trend of sales in time.
Sales TTD: This particular visual will be a simple Card with the SalesTTD measure.
Operating Profit:
Once each KPI is created, we place it in the report and complete the task.
At this point, the majority of the report is already done. So far, the work done looks like this.
The last thing to do is to create the two charts as per the specified requirements.
For both charts I will use “Line and Clustered Column Chart” visual, so, created the first one, let’s define it’s attributes and properties.
The first chart is the “Sales to Marketing Cost”, that reflects how sales increase in terms of the Marketing Cost, so you can view that while more money goes to Marketing, more Sales the company gets.
Sales value in Line y-axis is a measure of the Total_FTP filtered by SubClass “Sales” and it is stored in in GL table like the rest of the measures.
Sales = CALCULATE([Total_FTP], 'Chart of Accounts'[SubClass] = "Sales")
The second chart, focusing on Margin, Sales, and Profit, is created as a duplicate of the first chart with the necessary adjustments. GPMargin and NPMargin are dragged to the column y-axis to represent Gross Profit Margin and Net Profit Margin as columns, while displaying Gross Profit, Net Profit, and SalesFTP values as lines. This visual representation allows us to observe the fluctuations of both margins in relation to the net values.
Now that all the work is done we can see the finished report.
We can use the Slicers to dynamically filter information as well, for example, I can filter data for 2018 and 2019 only for France, Germany and UK. Data information will be adjusted for the desired filter.
Completing this financial reporting project in Power BI has been a rewarding journey, transforming raw financial data into a comprehensive Profit & Loss statement and dynamic visualizations. By following a systematic approach, we navigated through understanding the data, importing it into Power BI, and creating a robust data model.
The Chart of Accounts and General Ledger tables played a pivotal role in organizing and recording financial transactions. Leveraging the power of DAX, we meticulously crafted key performance indicators (KPIs) such as Sales, Gross Profit, Net Profit, and more. These measures not only provide insights into financial metrics but also allow for real-time adjustments and flexibility.
The inclusion of a calendar table enhanced our ability to perform time-based analysis, enabling year-over-year and quarter-over-quarter comparisons. Slicers for filtering by year and country add a dynamic layer to the report, allowing users to tailor their analysis.
With a visually appealing Profit & Loss matrix, we created a detailed hierarchy for both financial accounts and time periods. This matrix, along with other KPI tables and charts, forms the backbone of our financial reporting. The line and clustered column charts elegantly illustrate the relationships between sales, marketing costs, margin, and profit.
I've uploaded the Excel data file and Power BI project available on my GitHub repository. Feel free to download and explore the data, measures, and visualizations. Your feedback is valuable as we continue to refine and improve financial reporting practices.
Thank you for joining me on this journey through financial reporting in Power BI. Let's continue to learn, explore, and elevate our data analysis and visualization skills. Feel free to visit my GitHub repository for the complete project files.
Happy reporting!
Interim | Finance & Control | Power BI | Python | SQL | R Language
8moThank you for sharing!