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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
laff12
Frequent Visitor

Calculate the gains since the start date

Hi, 

I have a problem that I can't crack. I want to calculate the gains of a cable company. I have 2 tables. First table, "Calendar" stores the unique dates. The second table "Agreements" stores the information about the agreements:

 

  • Agreement column is a unique identifier of a contract
  • StartDate is a date when an agreement was signed
  • MonthlySubscription is a monthly fee that client pays to a company
  • ServiceFee is a one time gain for the company (generated in a month when agreement was signed

So each customer generates MonthlySubsctiption + ServiceFee as a revenue for the company in the first month and a MonthlySubscription in each subsequent month. I tried to create a measure that would generate the results similar to the one that I presented on a picture below in "Expected Result" table. Please note that even though I presented "Expected Result" as a table in fact measure should generate a scalar value for a specific date. Another useful information is that there is a one to many relationship between the Calender and Agreements (Date - StartDate).

laff12_0-1605214510053.png

 

 

 

1 ACCEPTED SOLUTION
laff12
Frequent Visitor
1 REPLY 1
laff12
Frequent Visitor

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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