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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.