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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

First and second year costs after start date contract

 Hi all, I have the following challenge:

 

Table1:

ContractNr | StartDate | EndDate

 

Table2:

ContractNr | Customer | Costs

 

Desired result (ContractNr as slicer):

          | Sum of Costs | Count Customer

Year1 | xx | xx

Year2 | xx | xx

 

I can make 4 separate measures to calculate each number but I can't make the desired matrix..

Is it possible to make a dynamic Date array based on the start date of the contract to evaluate in a measure to calculate the costs and count of the customers. 

 

Thanks in advance for the help.

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please correct me if I wrongly understood your question.

I tried to create a similar sample to the above description, but monthly basis, because I did not create more than two years of sample data.

Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

 

all measures are in the sample pbix file.

 

Picture9.png

 

https://www.dropbox.com/s/yuxazvn0jivyj7x/Rodentje.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Anonymous
Not applicable

@Jihwan_Kim  Hi there, thanks for your answer. 

I have the same report at the moment but I want to group it by first year cost. So if the contract starts 5-3-20, then first year should group all the cost from 5-3-20 to 5-3-21. Etc for other contracts which all have a different starting date. In that way we can compare the first year costs over the contracts.

 

Hopefully you can understand what i'm trying to do :).

Hi,

I am not quite sure if I understood correctly, and I don't think my sample suits your case.

Because the cost in my sample only shows year granularity.

Or,

Do you want to do something like cohort grouping? 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

amitchandak
Super User
Super User

@Anonymous , refer in my blog on the similar topic

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

I checked the topic but I want to group on years instead of averaging out the costs between start and enddate over the time..

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.