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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Janica123
Helper I
Helper I

Extracting date range from excel file and use them for calculations

Hi everyone, 

 

I have an Excel File with the name Pricelist_01.01.2022-31.12.2023.xlx that is stored in a SharepointThis file contains product prices which are only valid for the period from 01.01.2022 to 31.12.2023. The data in the file looks like this:

 

Janica123_0-1725970670912.png

 

I have a Power BI Sales Report, that shows the sales generated from the products.

 

I now need to implement a logic so that only the prices of the products contained in the excel with the name Pricelist_01.01.2022-31.12.2023.xlx are used for the sales calculations in the period from 01.01.2022 to 31.12.2023.

 

As soon as a new Excel with a new period (e.g. Pricelist_01.01.2023-31.12.2024.xlx) is loaded into the sharepoint, the old prices should no longer be used for the calculations in the Sales Report, but the new ones that are valid from 01.01.2023 to 31.12.2024. However, this only applies to the period, everything before the period should not be overwritten. Meaning the Calculations for eg. March 2022 must continue to be based on the prices from the Pricelist_01.01.2022-31.12.2023.xlx. 

Is there a possibility to implement such a logic? 

 

Many thanks in advance!

1 ACCEPTED SOLUTION
mickey64
Super User
Super User

For your reference.

Step 1: I add a "FY" column and "Key column" below.

"Pricelist_01.01.2022-31.12.2023.xlx"

mickey64_0-1725974362175.png

 

Step 2: I add a relationshop between "Pricelist Table" and "Sales Report Table" with "Key column".

View solution in original post

1 REPLY 1
mickey64
Super User
Super User

For your reference.

Step 1: I add a "FY" column and "Key column" below.

"Pricelist_01.01.2022-31.12.2023.xlx"

mickey64_0-1725974362175.png

 

Step 2: I add a relationshop between "Pricelist Table" and "Sales Report Table" with "Key column".

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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