How to add a column with the same value in Power BI

Do you know how to add a column with the same value in Power BI? If not, This Power BI tutorial will help you to create a column with the same value with different data types (like String, Date, Integer, etc.).

Add a column with the same value in Power BI

Let us see how we can add a column with the same value in Power BI.

Example:

  • For this scenario, we will use an Excel spreadsheet named Vehicle. This excel sheet has four fields: Car Names, Car Model, Price, and Color. Refer to the screenshot below.
add a column with the same value in Power BI
add a column with the same value in Power BI
  • Here, in the Vehicle excel sheet, we will create a new column with the same values for each row using Power BI. Let’s say, we will add a new column called Manufacture Date which will display the current date and time (and the same value will populate in every row of the spreadsheet).
  • So in the same way, we will see how to add a new column in Power BI with different data types (like String, Integer, Decimal, etc.).

Also read: How to add column with a fixed value in Power BI

Add a column with the same value in Power BI using the Date/Time Data type

In the Vehicle sheet, we will add a new column with the same value (Today’s Date & Time) using Power BI. Follow the steps below:

  • Open the Power BI Desktop, load the data, select the Modelling tab, and click on the New Column option to create a column.
  • Here, we are going to add the same value as Date and Time ( with Date/Time type) in all the rows presented in the table.
  • To work around this, apply the below-mentioned formula in the formula box and click on the check icon:
Manufacture Date = TODAY()

Where,

  1. Manufacture Date  = new column name where the current date will store
  2. TODAY= Function represented the current date and time
  • The screenshot below shows that the newly created column displays the same value date with time in the table.
  • By default, the current fixed date and time format will be highlighted below:
add a column with the same value in the Power BI
add a column with the same value in the Power BI

This is how to add a column with the same value as the Date/Time data type in Power BI.

Check out: How to add column from another table in Power BI [3 Different ways]

Add a column with the same value in Power BI using the Current Day

In the Vehicle sheet, we will add a new column with the same value (Today’s Day) using Power BI. Follow the steps below:

  • Open the Power BI Desktop, load the data, select the Modelling tab, and click on the New Column option to create a column.
  • Here, we are going to add the same value as the current Day in all the rows presented in the table.
  • To work around this, apply the below-mentioned formula in the formula box and click on the check icon:
Manufacture Day = FORMAT(TODAY(),"dddd")

Where,

  1. Manufacture Day   = New column name where the current day will store
  • The screenshot below shows that the newly created column displays the same value as the day in the table.
add a column with a same value in Power BI
add a column with the same value in Power BI

This is how to add a column with the same value as the current day in Power BI.

Have a look: Power Query Add Column [35+ Examples in Power BI]

Add a column with the same value in Power BI using the String Data type

In the Vehicle sheet, we will add a new column with the same value (current month) using Power BI. Follow the steps below:

  • Open the Power BI Desktop, load the data, select the Modelling tab, and click on the New Column option to create a column.
  • In this example, we are going to add the same value as October ( with String data type) in all the rows presented in the table.
  • For that, apply the below-mentioned formula in the formula box and click on the check icon:
Manufacture Month = "October"

Where,

  1. Manufacture Month = New column name where the current Month value gets stored
  2. October = Static String type
  • The screenshot below shows that the newly created column displays the same value as October for all the rows presented in the table.
add column with same value in Power BI
add column with the same value in Power BI

This is how to add a column with the same value with string data type in Power BI.

Read: How to Filter Power BI Dax Based On Condition

Add a column with the same value in Power BI using the Integer Data type

In the Vehicle sheet, we will add a new column with the same value (current year) using Power BI. Follow the steps below:

  • Open the Power BI Desktop, load the data, select the Modelling tab, and click on the New Column option to create a column.
  • In this example, we will add the same value as 2022 ( with String data type) in all the rows presented in the table.
  • For that, apply the below-mentioned formula in the formula box and click on the check icon:
Manufacture Year = 2022

Where,

  1. Manufacture Year = New column name where the current year will store
  2. 2022 = Static Integer type
  • The screenshot below shows that the newly created column displays the same value as the current year (i.e. 2022) in the table.
Power BI add column with same value
Power BI add a column with the same value

This is how to add a column with the same value with integer data type in Power BI.

Check out: How to Append Columns in Power Query

Add a column with the same value in Power BI using the Decimal Data type

In the Vehicle sheet, we will add a new column with the same value (Mileage) using Power BI. Follow the steps below:

  • Open the Power BI Desktop, load the data, select the Modelling tab, and click on the New Column option to create a column.
  • In this example, we will add the same value as 17.1 ( with Decimal data type) in all the rows presented in the table.
  • For that, apply the below-mentioned formula in the formula box and click on the check icon:
Mileage = 17.1

Where,

  1. Mileage = New column name where the mileage value gets stored

The screenshot below shows that the newly created column displays the same value as 17.1 for all the rows presented in the table.

Add a column with the same value in Power BI using the Decimal Data type
Add a column with the same value in Power BI using the Decimal Data type

This is how to add a column with the same value as the Decimal data type in Power BI.

Also, you may like the below Power BI Tutorials:

This Power BI tutorial explained how to add a column with the same value in Power BI. Also, we will cover the topics below:

  • What does the mean of adding a column with the same value in Power BI
  • How to add a column with the same value in Power BI using the Date/Time Data type
  • How to add a column with the same value in Power BI using the Current Day
  • How to add a column with the same value in Power BI using the String Data type
  • How to add a column with the same value in Power BI using the Integer Data type
  • How to add a column with the same value in Power BI using the Decimal Data type
>