New Year, Smarter Work: Get 1 Month Free Copilot | Now $21/User.

March 31, 2023

Using DAX to Create Custom Columns in Microsoft Power BI

Microsoft Power BI continues to provide our clients with up to date information to continue making great business decisions. An important aspect of Power BI is to optimize it to make sure the users are seeing the most relevant information. One way to make sure the visualizations and tables are reflecting the data concisely is to use DAX to create the necessary columns.

Microsoft Power BI displays Income and Cost of Goods Sold amounts, based on Account Categories and Dimension Value Codes found within Dynamics 365 Business Central. The visualizations below of a Power BI Table are referred to as Before and After in this blog.

As outlined in previously published blogs, the Business Central tables containing this data are Chart of Accounts, Dimension Set Entries, and General Ledger Entries (GL Entries).

Before:

After:

Although the data displayed within both objects is accurate, the After table offers the better presentation.

Within After, we have Income and Cost of Goods Sold amounts residing in separate columns and we have a column for Profit Margin.  We’re able to analyze amounts for Dimension Value Codes based on Account Category, without having to display the Account Categories!

We are able to present the data in a more concise and accurate table by utilizing DAX.

What is DAX?

DAX stands for “Data Analysis Expressions”.  According to Microsoft Learn, DAX is a “collection of functions, operators, and constants that can be used in a formula, or expression, to calculate and return one or more values.” Microsoft Learn, further, states that DAX creates new information from data already within your Power BI model. Using DAX allows you to create new columns within Power BI.

DAX Formulas

Again, the formulas or measures created using DAX are Income, Cost of Goods Sold, and Profit Margin:

  • Income = (sumx(FILTER(‘G_LEntries’, Related(‘Chart_of_Accounts'[Account_Category])=“Income”), ‘G_LEntries'[Amount]))*-1
  • Cost of Goods Sold = sumx(FILTER(‘G_LEntries’, Related(‘Chart_of_Accounts'[Account_Category])=“Cost of Goods Sold”), ‘G_LEntries'[Amount])
  • Profit Margin = [Income]-[Cost of Goods Sold]

Creating a DAX formula begins, by clicking the “New Measure” button:

After typing the name of the measure, such as “Income” or “Cost of Goods Sold”, you enter DAX functions as follows:

  • Sumx: returns the sum of an expression evaluated for each row in a table
  • FILTER: extracts data from a table based on specified criteria such as “Account Category”
  • RELATED: returns a related value from another table (“Income” or “Cost of Goods Sold”)

If you have any questions about Power BI data visualizaations, please do not hesitate to reach out to us at Support@BondConsultingServices.com or you can click here to schedule a consultation with one of our experts.

Share On: 

Other articles

Why Distribution Hand-Offs Break (and How Connected Operations Fix Them)

Jennifer Ryan

|

December 18, 2025
Inside distribution companies, most problems don’t come from bad people or broken intentions. They come from gaps in the hand-offs between teams.As a Controller, I used to think our issues…

Unlocking Insights: Power BI Integration with Dynamics 365 Business Central

Joel Trinidad

|

December 16, 2025
As businesses increasingly rely on data to drive decisions, Microsoft continues to enhance the synergy between Dynamics 365 Business Central (BC) and Power BI. With the release of Business Central Version 26, users now…

The Spreadsheet Trap in Distribution: Why You Lose Control Without Realizing It

Jennifer Ryan

|

December 11, 2025
Let me start with a confession: I love a good spreadsheet. They’re flexible. Fast. Familiar. Elegant.But here’s the problem no one talks about: Spreadsheets eventually become the system. And that’s…

How to Connect Power Pages & D365 Customer Engagement for a Seamless Self-Service Experience

Marisa Mini

|

December 4, 2025
Power Pages for Customer Service, Field Service, and Sales PortalsCreating a seamless, modern customer experience starts with reducing the back-and-forth. If your customers (or vendors, partners, applicants, members, etc.) still…

How to Tell if Your Distribution Business Has Outgrown Its Systems

Jennifer Ryan

|

December 1, 2025
As a former Controller inside a fast-moving distribution business, I learned this lesson the hard way: You don’t realize your system is breaking until growth exposes every weakness.It doesn’t happen…

Why Microsoft Killed Social Posting (And Why SMBs Should Care)

Jackie Gant

|

November 25, 2025
When Microsoft quietly pulled the plug on social posting in Dynamics 365 Customer Insights late last year, few in the small to mid-sized business (SMB) space raised an eyebrow. After…