Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Anonymous
Not applicable

Creating a calculated column

Hi, I'm fairly new to Power Bi and I'm not understanding how to do this.

Let's say I have table (1) and I want to create table (2):
(1)Starting tableStarting table

(2)What I wantWhat I want
I managed to create table (3), but I want to create a calculated column like the one in table (2)
(3)end0.jpg

I don't know how to summarize in a calculated column.
Any help would be greatly appreciated, 
thanks

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Anonymous ,

 

to get rid of rows, you always have to use Power Query. A calculated column just adds a new column, but it will not combine rows.

In your case you need a group by with the following criteria:

selimovd_0-1627377854844.png

Then the result will look like this:

selimovd_1-1627378063218.png

 

 

Check the video I created on how to do that, it's pretty easy:

groupby.gif

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

3 REPLIES 3
selimovd
Super User
Super User

Hey @Anonymous ,

 

to get rid of rows, you always have to use Power Query. A calculated column just adds a new column, but it will not combine rows.

In your case you need a group by with the following criteria:

selimovd_0-1627377854844.png

Then the result will look like this:

selimovd_1-1627378063218.png

 

 

Check the video I created on how to do that, it's pretty easy:

groupby.gif

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

Thank you for your solution, I will try it out.
Let's say I don't care about rows, i.e. I want every rows to display the sum of "Value" for every "Name", how would you do that?

Hey @Anonymous ,

 

you can add a calculated column and ignore all the row context except for the Name. The following calculated column will do that:

Total Value by Name =
CALCULATE(
    SUM( 'myTable'[Value] ),
    ALLEXCEPT(
        'myTable',
        'myTable'[Name]
    )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.