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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Calculate total per specific row and store to column

I've mentioned it before but I haven't yet reached a solid solution. The scenario is about values that stored in Azure's SQL Database and retrieved in Power BI in direct query mode. The ten values are sampled and stored accumulatively (totalizer) several times per day. But, the values we really want to use for reporting reasons are the last values of every day.

 

In the below screenshot is a sample of data after exported to an EXCEL file for the sake of this post:

sum_per_max_day.png

 

  • I want to calculate the sum of values of the last timestamp of the day and store it to new column, e.g. TOTALMAX_PERDAY. The same per week, per month, per year and stored to respective columns, e.g. TOTALMAX_PERWEEK, TOTALMAXPER_MONTH etc.

  • Apparently, the substraction of the max value of current day (week, month etc) minus the max value of the previous day (week, month etc.) results to the respective production.
  • I've also created a calendar table that needs to be connected to the "production" table (the one mentioned above) for time intelligence reporting, of course in conjustion with my previous calculations.

Any ideas appreciated,

Thanks in advance.

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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