• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Iterative calculations|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Iterative calculations|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Iterative calculations
sp_PrintTopic sp_TopicIcon
Iterative calculations
Avatar
Julien Vandamme
Member
Members
Level 0
Forum Posts: 11
Member Since:
May 14, 2022
sp_UserOfflineSmall Offline
1
March 6, 2023 - 10:14 pm
sp_Permalink sp_Print sp_EditHistory

Hi everybody,

 

I made a table for calculating the part of renewable energy used by a building for one year.

On the other side we do calculations of the energy savings of some actions and the years we would implement those actions.

Now I'm calculating this the following way:

Table 0 : Actions and year of implementing them

Table 1 - Year 0 : Actual situation - First time putting in the values of energy consumption

Table 2 - Year 1 : Table based on actual situation table 1 minus the savings of table 0 (if some actions are in that year)

Table 3 - Year 2 : Table based on table 2 minus savings of table 0 (if some actions are planned that year)

And so on.

 

It's was fastidious making those tabels and do the right referencing to the right cells and so on.

 

I do beleive their is a better way doing it but I don't see how.

 

I can work with Power Query and I'm starting Power Pivot if the solution bring us that way.

 

https://freestonebelgium-my.sh.....A?e=IUjqGT

(Tell me if the link don't work)

 

Cordially

Julien Vandamme

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 70
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
2
March 7, 2023 - 5:13 pm
sp_Permalink sp_Print

I have a similar set of data and what I did is create a dashboard sheet that reads the data.

I cannot share it since it's too large and contains our own values.

But what I did was once I had a correct version of how I wanted it, I recorded a macro and replicated that took over the formulas. Once the macro is recorded you can edit it and change the variables so thant when you change the variable like Year and Yera-1 or Year -2 it takes over the current values.

Maybe it sounds complicated but it's not that difficult unless your VBA knowledge is letting you down.

Here's a sample of one of the formulas for January of the selected year:

I added an extra line in between the different calcutaltions for my own readability

Screenshot-2023-03-07-081135.pngImage Enlarger

Hope it makes sense

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2023-03-07-081135.png (299 KB)
Avatar
Julien Vandamme
Member
Members
Level 0
Forum Posts: 11
Member Since:
May 14, 2022
sp_UserOfflineSmall Offline
3
March 7, 2023 - 10:33 pm
sp_Permalink sp_Print

Hi, I've no VBA knowledge 🙁 

 

If it's possible I'd like to have it all in one table so I can make PowerPivot and Charts out of it.

The other option I had is working with power queries which I duplicates and where each query is based on the previous, but that looks like it would be very slow in Excel refreshes.

 

I'd also like to put the "intelligence" (way of working) in Power Bi later with the possibility to change the startyears of the actions, that's why I look for a systems that could be done in Power BI.

 

Greetz

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 70
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
4
March 8, 2023 - 5:11 pm
sp_Permalink sp_Print

I'll have to take a deeper look at the way you have your data.

What I did with the table where all source information is stored is add a number of extra columns with formulae to help me filter the data with the macros.

Screenshot-2023-03-08-080608.pngImage Enlarger

The columns A-G contain the dat read directly from the csvfile I download from the energy company, the columns H-N contain formulas that extract as the header tells you the year, month, day and the data a s date since column A is a textstring and not an actual date value, the day of the week (1=Sunday, 2=Monday, etc)
Stroom is empty except for when the month changes in that case its the max of february - the min of february

This youbcan use for any pivot table or whatever you want and can be done without VBA

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2023-03-08-080608.png (59 KB)
Avatar
Julien Vandamme
Member
Members
Level 0
Forum Posts: 11
Member Since:
May 14, 2022
sp_UserOfflineSmall Offline
5
March 9, 2023 - 5:41 pm
sp_Permalink sp_Print

Hi Hans,

 

I don't see where the iterative calculation is, based on the precedent ?

 

Cordially

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 70
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
6
March 10, 2023 - 4:50 pm
sp_Permalink sp_Print

There is no calculation in what I showed you, the only thing I said was that if you add the formulas to your downloaded source data you can then use it at will with any pivort table, power bi or wahtever.

The data I download from my energy provider is in csv and this data I load into a table.

The columns A-G are the contents of the data i get from my provider the columns to the right and more if you make them are fourulae that extract the data from the one or more of the previous columns so that you have something to work with

Avatar
Julien Vandamme
Member
Members
Level 0
Forum Posts: 11
Member Since:
May 14, 2022
sp_UserOfflineSmall Offline
7
March 11, 2023 - 9:37 pm
sp_Permalink sp_Print

Is this still in VBA ?

 

I'm not totally following the concept or explanation 🙁

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 70
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
8
March 13, 2023 - 8:56 am
sp_Permalink sp_Print

I have attached a part of the table that I reffrence for my overviews 

This table I sue as my source for graphs information, fileter by year, month day or even weeks

 

Maybe this explains it a little bit more

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Ivica Cvetkovski
Blaine Cox
Shankar Srinivasan
riyepa fdgf
Hannah Cave
Len Matthews
Kristine Arthy
Michelle Neven
Andrew Kuhn
Angela Paul
Forum Stats:
Groups: 3
Forums: 24
Topics: 6206
Posts: 27202

 

Member Stats:
Guest Posters: 49
Members: 31875
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.