Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi ,
I have the following structure for my dataset :
1 line per contract ,
- contract ID
- Start date
- End Date
- Monthly amount
I'd like to make a chart where i can see the running total by month ( calculated between start and end date for each contract )
I tried to create a table date ,I linked this table to start and end date , then i disabled theese links.
I tried to do something like
Solved! Go to Solution.
Thanks for the reply from@lbendlin , please allow me to provide another insight:
Hi, @BREH95
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Create calculated table references:
time =
CALENDAR (
MIN ( 'Table'[START_DATE] ),
MAX ( 'Table'[START_DATE] ) + MAX ( 'Table'[duration] ) - 1
)
result =
FILTER (
CROSSJOIN ( 'time', 'Table' ),
'time'[Date] >= 'Table'[START_DATE]
&& 'time'[Date] <= 'Table'[START_DATE] + 'Table'[duration]
)
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Assuming your Monthly Amount is due regardless of when in the month the start and end dates are you can use DATEDIFF. But you need to leave your calendar table disconnected.
Hello @lbendlin ,
Thanks for your answer 🙂
Your solution works perfectly if i select 1 contract but doesn't work if multiple selected ..
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
Here are my data ,
I need to calculate the end date ( I use dateadd , with duration in month )
then i'd like to generate this data structure for each contract
and the resultat should look like this
Thanks for the reply from@lbendlin , please allow me to provide another insight:
Hi, @BREH95
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Create calculated table references:
time =
CALENDAR (
MIN ( 'Table'[START_DATE] ),
MAX ( 'Table'[START_DATE] ) + MAX ( 'Table'[duration] ) - 1
)
result =
FILTER (
CROSSJOIN ( 'time', 'Table' ),
'time'[Date] >= 'Table'[START_DATE]
&& 'time'[Date] <= 'Table'[START_DATE] + 'Table'[duration]
)
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |