Forum

How do i calculate ...
 
Notifications
Clear all

How do i calculate the amount by taking the value from an earlier date?

10 Posts
2 Users
0 Reactions
68 Views
(@zchase)
Posts: 18
Eminent Member
Topic starter
 

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?

 
Posted : 02/09/2020 9:04 am
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 02/09/2020 7:03 pm
(@zchase)
Posts: 18
Eminent Member
Topic starter
 

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)

 
Posted : 02/09/2020 10:32 pm
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 03/09/2020 6:58 pm
(@zchase)
Posts: 18
Eminent Member
Topic starter
 

Here is the file.

 
Posted : 05/09/2020 9:55 am
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 06/09/2020 1:26 am
(@zchase)
Posts: 18
Eminent Member
Topic starter
 

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

 
Posted : 08/09/2020 8:11 am
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 08/09/2020 6:35 pm
(@zchase)
Posts: 18
Eminent Member
Topic starter
 

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.

 
Posted : 22/10/2020 7:48 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Francis,

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

Thanks,

Mynda

 
Posted : 23/10/2020 7:15 am
Share: