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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
alex779
Frequent Visitor

How to sum by rows these data ?

Hello There!
I am importing  energy values listed by days (column "Giorni") AND by "quarter of an hour columns" (96 columns = 4*24h/day) . I need to add a column next to day with the daily sum of all energy values for that day, i.e. sum the values by row for each 96 columns..
.
Is it at all possible in P.Bi or should I import data in a different way ? 

 

Hope you can access my shared example.pbix file since I don't know how to send it:

example.pbix

 

Please help. Thanks a lot, Alex

 

alex779_0-1688140287738.png

 

 

 

2 ACCEPTED SOLUTIONS

Hi Alex, mark as a solution if resolve your problem.



Luca D'Elicio

LinkedIn Profile

View solution in original post

Now don't use a calculated column to do this.
But use the automatic measure sum of Valore.
Create a table and put in Day and Sum of Valore.

lucadelicio_0-1688158556164.png

 



Luca D'Elicio

LinkedIn Profile

View solution in original post

7 REPLIES 7
lucadelicio
Super User
Super User

Another faster way is to unpivot this table in the Power Query Editor.

 

And returns a table like this:
POD - Giorno - Quarter - Value

In this way you can sum faster all the value for a day with a measure like:

MEASURE = 
SUM(Table[value])

Put in a visual table type the day and the measure and you'll have the result.

 

Mark as a solution if resolve your problem.

 

Ciao



Luca D'Elicio

LinkedIn Profile

Thank you Luca. Actually it only partially solves my problem: it works fine as you suggested in a visual table but  I'd rather prefer to have it in a new column or new data table. 
I tried this after unpivoting (thanks a lot!) on a new column called "Sum by day":

 

Sum by day = SUMX(FILTER(Table, Table[Giorno]="31/07/2022"),[Valore])

 

Unfortunately it only calculates on the indicated day but assign the result for each day which is weird..my foult I know.. no idea how to make SUMX recursive on all different days.. 

 


@lucadelicio wrote:

Another faster way is to unpivot this table in the Power Query Editor.

 

And returns a table like this:
POD - Giorno - Quarter - Value

In this way you can sum faster all the value for a day with a measure like:

MEASURE = 
SUM(Table[value])

Put in a visual table type the day and the measure and you'll have the result.

 

Mark as a solution if resolve your problem.

 

Ciao


 




alex779_0-1688157000113.png

 

Now don't use a calculated column to do this.
But use the automatic measure sum of Valore.
Create a table and put in Day and Sum of Valore.

lucadelicio_0-1688158556164.png

 



Luca D'Elicio

LinkedIn Profile

Hi Alex, mark as a solution if resolve your problem.



Luca D'Elicio

LinkedIn Profile
lucadelicio
Super User
Super User

Hi Alex,

try to create a calculated column in wich you put a SUM.
ColonnaCalcolata =
SUM(Colonna1, Colonna2, Colonna n)
This column it will contain the sum of your column.

Let me know if i help you.

Mark it as a solution if resolve your problem!

Ciao

 



Luca D'Elicio

LinkedIn Profile

The pbix is not accessible beacause is on your tenant.



Luca D'Elicio

LinkedIn Profile

updated link
example.pbix

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.