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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
aryan
Helper I
Helper I

How to enter formula for each row.

Hi,

I am facing a problem,I have three different columns as column A,B,C. I took a custom column in the custom column, i need first row as Sum of column A, in second row i need sum of column B, in third row i need sum of Column C how to calculate this

Plz help me out

 

Thanks in advance

14 REPLIES 14
erikajain02
Resolver I
Resolver I

Please share some sample data and desired output ..!!
mattluk
New Member

you can click "edit queries" in home tab and click "customer column" in add column tab

I need to display a table report with sum of different column as one column

how can i do that

Sorry Aryan,

 

your requirement is not very clear to me untill you post some sample data of around 10 rows and desired output format.

 

If you only want the totals of all three columns in just one table .

You can three measures for each of the columns total.

then choose Matrix and drag the three measures in it.

then u can choose Format tab : "Show on rows : on " State.Sample2.PNG 

consider this as my report

 Total
Sum of customers4
Sum of Other charges120
Sum of charges360

 

this my table

    
customerschargesOther charges
110050 
23010 
310020 
413040 

 from this table i need to develop the above report 

Add 3 Measures: 

Sum of Other Charges = Sum(Table1[Other charges])
Sum of Customers = DISTINCTCOUNT(Table1[customers])
Sum of charges = Sum(Table1[charges])

 

The add a Matrix :

Add the three Measures in it.

 Go to Format option > Value > Show on Row : On

 

 

 

 

 codesTotal
Sum of customers27
Sum of Other charges3120
Sum of charges4360
   

 i tried using matrix it should look like this

You can achieve this by creating a new table New AttributeTable.PNGThis table will remain island and will not link to any other table in the model.

 then in Report View :

U can create a Matrix  with dimension as Attribute .

Now create 2 measures :

Sum = if(MAX([Sort])=1,[Sum of Customers],if(MAX([Sort])=2,[Sum of charges],[Sum of Other Charges]))

Count = if(MAX([Sort])=1,DISTINCTCOUNT(Table1[customers]),if(MAX([Sort])=2,DISTINCTCOUNT(Table1[charges]),DISTINCTCOUNT(Table1[Other charges])))

RP View.PNG

You can edit logic / calculations as per your requirement.

can we enter data in to custom column in power bi like for custom column      count

                                                                                                                                  1

                                                                                                                                  2

                                                                                                                                  3

                                                                                                                                  4

                                                                                                                                  5

                                                                                                                                  6

 

 

Hi @aryan,

 

It seems that your initial requirement have been solved. Please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


@aryan wrote:

can we enter data in to custom column in power bi like for custom column      count

                                                                                                                                  1

                                                                                                                                  2

                                                                                                                                  3

                                                                                                                                  4

                                                                                                                                  5

                                                                                                                                  6

 

 


 

In addition, do you want to create a custom column like above in Query Editor?

 

If you want to create that column, you could go to Editor Queries——Add Column——Index column.

 

If you need additional help, please share your desired output.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

can we data in to column from edit query like for column              count

                                                                                                              1

                                                                                                              2

                                                                                                              3

                                                                                                              4

                                                                                                              5

                                                                                                              6 

Total Step 1.PNGTotal Step 2.pngHope This helps !!!!

Thank u very much but if want to insert codes in between that 2 columns

you can click the table and add the values which colum data you whant, and select sum

 

2018-07-23_153846.png

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors