• 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

How do i calculate the amount by taking the value from an earlier date?|Power Query|Excel Forum|My Online Training Hub

You are here: Home / How do i calculate the amount by taking the value from an earlier date?|Power Query|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 ForumPower QueryHow do i calculate the amount by ta…
sp_PrintTopic sp_TopicIcon
How do i calculate the amount by taking the value from an earlier date?
Avatar
Francis Ong
Member
Members
Level 0
Forum Posts: 19
Member Since:
August 26, 2020
sp_UserOfflineSmall Offline
1
September 1, 2020 - 11:04 pm
sp_Permalink sp_Print

Taking example from the attached excel file to calculate the total in USD currency.

 

When i merge the queries, i cannot get the result for the missing date with exchange rate.

I would like to calculate the amount with the exchange rate taking from an earlier date.

 

May i know how to do it?

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
September 2, 2020 - 9:03 am
sp_Permalink sp_Print

Hi Francis,

I'm a bit confused. You don't have any amounts in the transaction table on the 1/1/2020 and there are no prior amounts to that date. Your file doesn't show an example of your desired result, so it's not completely clear what you're wanting to do.

If you're wanting to see the amount of 1000 on the 2/1/2020 copied up to the 1/1/2020 then you can use the Fill Up tool on the Amount column after the merge is completed.

Mynda

Avatar
Francis Ong
Member
Members
Level 0
Forum Posts: 19
Member Since:
August 26, 2020
sp_UserOfflineSmall Offline
3
September 2, 2020 - 12:32 pm
sp_Permalink sp_Print sp_EditHistory

Sorry, my mistake.

 

The actual requirement is that there is no exchange rate for 1/1/2020 and i have amount for 1/1/2020 and i want the amount in USD to be calculated for 1/1/2020 using the next available exchange rate preferably the earlier date with exchange rate.

 

Attached is the revised excel file which i believe is the solution that you advise to fill up.

I notice that while creating the merge file, i didn't properly match the fields since they are two fields.

Date > Date and Currency > Currency

& not Date > Currency and Currency > Date (which i didn't get the results)

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
September 3, 2020 - 8:58 am
sp_Permalink sp_Print

Hi Francis,

Your file didn't upload properly. Please try again and be sure to wait for the 'upload completed' text to appear in green under the yellow 'start upload' button before pressing the 'submit reply' button.

Mynda

Avatar
Francis Ong
Member
Members
Level 0
Forum Posts: 19
Member Since:
August 26, 2020
sp_UserOfflineSmall Offline
5
September 4, 2020 - 11:55 pm
sp_Permalink sp_Print

Here is the file.

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
September 5, 2020 - 3:26 pm
sp_Permalink sp_Print

Hi Francis,

When you do a merge you select the matching columns one by one i.e. as per your example above: Date > Date and Currency > Currency

While fill up worked in this example, be careful if you have scenarios where you have multiple currencies as fill up will only work if the currency on the row below the empty cell is the same.

Mynda

Avatar
Francis Ong
Member
Members
Level 0
Forum Posts: 19
Member Since:
August 26, 2020
sp_UserOfflineSmall Offline
7
September 7, 2020 - 10:11 pm
sp_Permalink sp_Print

If i sort by currency before i fill up would that work?

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
8
September 8, 2020 - 8:35 am
sp_Permalink sp_Print

You'd need to sort by currency and then by date. I'd test some scenarios to make sure it gives the correct result.

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
Francis Ong
Member
Members
Level 0
Forum Posts: 19
Member Since:
August 26, 2020
sp_UserOfflineSmall Offline
9
October 21, 2020 - 9:48 pm
sp_Permalink sp_Print

I am exploring Power Bi and using measure to calculate the value from the native currency to USD currency. I want to retain the existing exchange rate tables with missing dates. How should i write the measure allowing me to take the exchange rate containing in the earlier record/date for that currency to calculate the value.

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4446
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
10
October 22, 2020 - 9:15 pm
sp_Permalink sp_Print

Hi Francis,

Please start a new question/topic in the Power Pivot forum and include a sample file.

Thanks,

Mynda

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: s Ramchandran, Jeff Krueger
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:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27237

 

Member Stats:
Guest Posters: 49
Members: 31889
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.