cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
bsas
Post Patron
Post Patron

Cumulated revenue based on duration of project

Hi PBI Experts,

 

I'm new to PBI and need to make some calculation but I have no idea how distribute revenue depending on duration of project. Simple data from my table:

 

billing start date  revenue per month  duration of project:

1/1/2017              20,000.00                            5

2/5/2017              34,000.00                            3

4/13/2017            45,000.00                            4

 

e.g. First project started in Jan and duration is 5 month, another project started in Feb . Revenue for Jan should be 20K, for Feb 20K for Jan +20K for Feb from 1 project + 34K for Feb from second project = 74K. 

 

I try to use measure:

Cumulative_Revenue = CALCULATE(SUM(Acc_Opp[revenue]),
FILTER(FILTER(ALLSELECTED(Acc_Opp),Acc_Opp[Status] = "1.Won"), 
Acc_Opp[Billing start date] <= MAX(Acc_Opp[Billing start date])))

it gives me cumulative revenue but without duration dependency. How I can add duration in this measure. Or maybe there is another way to solve this problem?

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@bsas,

 

You may refer to the .pbix attached.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@bsas,

 

You may refer to the .pbix attached.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft,

 

Sorry for disturbing you, but could you help me to change measure to calculate same revenue but do not add value from previous month?

 

e.g. First project started in Jan and duration is 5 month, another project started in Feb . Revenue for Jan should be 20K, for Feb - 20K for Feb from 1 project + 34K for Feb from second project = 54K. For April 20 + 34 + 45=99

 

I've created such measure but it's hardcoded only for 2017 (I have no idea how to change it) and know I need to apply it to few years.

year_billing = CALCULATE(SUM(opportunity[new_runrate]),
FILTER(opportunity,opportunity[billing_start_date]
<= CALCULATE(MAX(cal[calendar_date].[Date]))),
FILTER(opportunity,IF(opportunity[duration_UPD]=1,
opportunity[billing_start_date],
IF(opportunity[billing_start_date]+(opportunity[duration_UPD]*31)
> DATE(2017,12,31),DATE(2018,1,1),
opportunity[billing_start_date]+(opportunity[duration_UPD]*31)))
>= CALCULATE(MIN(cal[calendar_date].[Date]))))

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors