Working with Numbers in Power BI
Last Updated :
24 May, 2024
Power BI, a leading business intelligence tool, empowers users to analyze and visualize data, making it easier to derive meaningful insights. To do this effectively, it's crucial to understand how to work with numbers in Power BI.
Working with numbers is a fundamental aspect of data analysis, encompassing a wide range of activities from collecting and organizing data to performing calculations and drawing meaningful insights. In the realm of data-driven decision-making, numbers serve as the language through which patterns, trends, and anomalies in data are deciphered. Whether it's in the context of financial analysis, scientific research, or business intelligence, the ability to work with numbers efficiently is a critical skill.
Importing Numerical Data
Before you can work with numbers in Power BI, you need to import your numerical data. This can come from a variety of sources, including databases, Excel spreadsheets, web services, and more. Power BI allows you to connect to these sources and load data into your project.
-(3).jpg)
Once the data is imported, Power BI will automatically recognize numerical fields and format them accordingly. This data can then be used in visualizations, calculations, and aggregations.
Lets take an example we are going to import the sample store DATASET which has 13 columns.

Aggregating Numerical Data
One of the primary ways you work with numerical data in Power BI is by aggregating it. Aggregation involves summarizing large datasets into more manageable and meaningful values. Here are some common aggregation functions used in Power BI:
Sum
This function adds up all the values in a numerical column, useful for calculating total sales, revenue, or quantities.

Average
Calculates the mean or average value of a numerical column, which can help you understand typical values in your data.
.png)
Count
Counts the number of records in a column, which can be useful for understanding the volume of data or the number of occurrences of a specific item.
.png)
Minimum and Maximum
These functions find the smallest and largest values in a column, helping identify extremes in your data.

Median and Quartiles
Useful for finding the middle value and dividing data into quartiles, which can provide insights into the data's distribution.

Also you can change the datatype like this :-
Creating Calculated Columns
Power BI offers the ability to create calculated columns using Data Analysis Expressions (DAX). This feature allows you to generate new numerical columns based on existing data. Common use cases for calculated columns include:
For Calculated Columns or Customized Columns:
Click on transform data,
TRANSFORM-DATA It will take you to Power Query Editor.

Here we calculated the custom column of Delivery Days by subtracting Ship Data and Order Date

Calculated columns are a crucial feature in Power BI for working with numbers. You can create new columns based on calculations using DAX (Data Analysis Expressions).

Now we'll change the data type of column .

Lastly the column with changed datatype :

Representation With Graphs
CLUSTERED GRAPHDASHBOARD
- Derived Metrics: You can create columns that calculate metrics like profit margins, growth rates, or any other custom calculations based on your numerical data.
- Categorization: Transform numerical values into categories or buckets for easier analysis. For instance, you could categorize ages into age groups.
- Date Calculations: If you're working with date-related numerical data, you can create calculated columns to derive information such as year, quarter, or month from a date field.
- Ranking: You can create calculated columns to rank data, such as ranking products by sales or customers by spending.
.jpg)
Formatting numeric data in Power BI
Formatting numeric data in Power BI is essential for presenting data in a clear and meaningful way to users. Power BI offers various formatting options, data types, and custom number formats to help you achieve this. Below are some examples of how to format numeric data in Power BI:
Formatting Options:
Power BI provides several formatting options for numeric data. To apply these formats:
- Decimal Places: You can specify the number of decimal places to display for decimal numbers. For example, you might want to show 2 decimal places for sales values.
- Thousand Separator: You can choose whether to display a thousand separator (e.g., comma) in large numbers for better readability.
- Negative Numbers in Red: You can make negative numbers appear in red for emphasis.
- Currency Symbol: Customize the currency symbol and position (e.g., $1,000 or 1,000 USD).
- Date/Time Format: Specify the date and time format, such as "MM/DD/YYYY" or "HH:mm:ss."
Custom Number Formats:
Power BI allows you to create custom number formats using the following symbols:
- '0': Displays a digit, even if it's a leading or trailing zero.
- '#': Displays a digit, but doesn't show leading or trailing zeros.
- '%': Converts the number to a percentage.
- ',': Adds a thousand separator.
- '.00': Specifies the number of decimal places.
For example, you can create a custom number format like "$#,##0.00" to format a currency value with a thousand separator and two decimal places.
Best Practices
To ensure a smooth experience when working with numbers in Power BI, it's crucial to follow best practices. This section will provide guidance on:
- Data Modeling: Explaining the importance of a well-structured data model and how it impacts numerical calculations.
- Performance Optimization: Tips for optimizing the performance of your Power BI reports when dealing with large datasets and complex calculations.
- Documentation: Emphasizing the importance of documenting your calculations and measures for the benefit of yourself and your team.
- Visualizing Numerical Data: To gain insights from numerical data, Power BI provides a wide range of visualization options. Bar charts, line charts, scatter plots, and more can be used to visually represent your data. These visualizations help in interpreting data patterns, trends, and outliers, making it easier to identify actionable insights.
Furthermore, you can add filters, slicers, and drill-through capabilities to enhance the interactivity of your reports, allowing users to explore the data on their terms.
Conclusion
Working with numbers in Power BI is a fundamental aspect of data analysis and visualization. It involves importing numerical data, aggregating it, creating calculated columns, and presenting it through various visualizations. This process allows businesses to uncover trends, make informed decisions, and drive data-driven strategies.
Similar Reads
Working with R Scripts in Power BI Desktop
Power BI is a very useful tool when it comes to working with powerful scripting languages such as R Programming. Power BI in itself is a powerful tool for data visualization. Using R scripts in Power BI Desktop can further enhance your data analysis and visualization capabilities, making the job of
4 min read
Power BI - Drill through Filters
You may designate a destination target page in your Power BI report that focuses on a particular entity, such as a supplier, client, or manufacturer. Right-clicking a data point on one of the source report pages will take readers to the target page, where they can read the information filtered for t
7 min read
Power BI Tutorial | Learn Power BI
Power BI is a Microsoft-powered business intelligence tool that helps transform raw data into interactive dashboards and actionable insights. It allow users to connect to various data sources, clean and shape data and visualize it using charts, graphs and reports all with minimal coding.Itâs widely
5 min read
Power BI - Explain the 'M language'
A robust "get data" experience with many options is offered by Microsoft Power Query. The ability to filter and mix, or "mash-up," data from one or more of the many supported data sources, is a fundamental feature of Power Query. Using the Power Query Formula Language, such data mashups are expresse
5 min read
Editing Power BI Report Interactions
Power BI is a platform that is used to connect, visualize, and share data with other users. It is a business analytics and data visualization tool that converts data from sources extracts information from that data and represents it in interactive visualizations and reports. In this article, we will
10 min read
How to write numbers in standard form?
Exponents and powers are used to show very large numbers or very small numbers in a simplified manner. For example, if we have to show 2 Ã 2 Ã 2 Ã 2 in a simple way, then we can write it as 24, where 2 is the base and 4 is the exponent. The whole expression 24 is said to be power. Power is a value o
4 min read
Power BI - Filters
Power BI filters refine your data sets to supply and display data that is relevant to you. employing a filter in Power BI, you can: Work with smaller parts of your data.Do calculations for particular groups of interest.Exclude âbadâ data from data visualisations.Train and validate statistical models
5 min read
How to Calculate Work and Power
Work is defined as the energy transferred to or from an object via the application of force along a displacement. Work is done when a force causes an object to move. Power is defined as the rate at which work is done or energy is transferred over time. It measures how quickly work can be completed o
6 min read
Adding Trend Lines & Forecasts in Power BI
Power BI's trend lines and forecasts feature is a useful tool for data analysis and visualization. Your data-driven decision-making process can be improved by using trend lines and forecasts in your Power BI graphics. This post will provide step-by-step directions and screenshots for adding trend li
6 min read
Power BI - How to Create Workspace?
Workspace is a folder, where all your workbooks, datasets, reports, and dashboards are stored. One can create a workspace, in Power BI online service. In this article, we will learn how to create a workspace in Power BI online service. How to Create a Workspace in Power BI By default, Power BI onlin
2 min read