Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a contract table and a date table, which I have build the realtionship among the date table (Date) with contract table( Startdate and Enddate). How shall I build the measure to calculate the accumulated qty and costs each month from 01.01.2026 ?
Contract | QTY(kg/per day) | Price (€/kg) | Produkte | Startdate | Enddate |
2025-1 | 1000 | 37,14 | 2026/CA | 01.01.2026 | 31.12.2026 |
2025-2 | 2000 | 42,335 | 2026/Q1 | 01.01.2026 | 31.03.2026 |
2025-3 | 2000 | 35,79 | 2026/Wi | 01.10.2026 | 31.03.2027 |
2025-4 | 1000 | 30,84 | 2027/CA | 01.01.2027 | 31.12.2027 |
2025-5 | 3000 | 30,24 | 2027/Wi | 01.10.2027 | 31.03.2028 |
2025-6 | 1000 | 27,815 | 2028/CA | 01.01.2028 | 31.12.2028 |
2025-7 | 15000 | 27,87 | 2028/Q4 | 01.10.2028 | 31.12.2028 |
2025-8 | 5000 | 69,05 | 2028/CA | 01.01.2028 | 31.12.2028 |
2025-9 | 2300 | 31,315 | 2027/CA | 01.01.2027 | 31.12.2027 |
2025-10 | 2300 | 27,822 | 2028/CA | 01.01.2028 | 31.12.2028 |
2025-11 | 9000 | 36,08 | 2027/Q1 | 01.01.2027 | 31.03.2027 |
Solved! Go to Solution.
@Yan2025 Ensure you have a date table that spans the entire period you are interested in, from 01.01.2026 onwards.
Make sure your date table is related to the contract table using the Startdate and Enddate fields.
This measure will calculate the total quantity up to the current date in the context of your report.
Accumulated Quantity =
CALCULATE(
SUM(Contract[QTY(kg/per day)]),
FILTER(
ALL(Date),
Date[Date] <= MAX(Date[Date]) &&
Date[Date] >= Contract[Startdate] &&
Date[Date] <= Contract[Enddate]
)
)
This measure will calculate the total cost up to the current date.
Accumulated Cost =
CALCULATE(
SUMX(
Contract,
Contract[QTY(kg/per day)] * Contract[Price (€/kg)]
),
FILTER(
ALL(Date),
Date[Date] <= MAX(Date[Date]) &&
Date[Date] >= Contract[Startdate] &&
Date[Date] <= Contract[Enddate]
)
)
You can now use these measures in a report to visualize the accumulated quantities and costs over time. Make sure your report's date range starts from 01.01.2026.
Proud to be a Super User! |
|
Hi @Yan2025
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @Yan2025
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @Yan2025
Could you please confirm if your query have been resolved the solution provided by @bhanu_gautam ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.
Thank you
@Yan2025 Ensure you have a date table that spans the entire period you are interested in, from 01.01.2026 onwards.
Make sure your date table is related to the contract table using the Startdate and Enddate fields.
This measure will calculate the total quantity up to the current date in the context of your report.
Accumulated Quantity =
CALCULATE(
SUM(Contract[QTY(kg/per day)]),
FILTER(
ALL(Date),
Date[Date] <= MAX(Date[Date]) &&
Date[Date] >= Contract[Startdate] &&
Date[Date] <= Contract[Enddate]
)
)
This measure will calculate the total cost up to the current date.
Accumulated Cost =
CALCULATE(
SUMX(
Contract,
Contract[QTY(kg/per day)] * Contract[Price (€/kg)]
),
FILTER(
ALL(Date),
Date[Date] <= MAX(Date[Date]) &&
Date[Date] >= Contract[Startdate] &&
Date[Date] <= Contract[Enddate]
)
)
You can now use these measures in a report to visualize the accumulated quantities and costs over time. Make sure your report's date range starts from 01.01.2026.
Proud to be a Super User! |
|
User | Count |
---|---|
83 | |
80 | |
69 | |
46 | |
46 |
User | Count |
---|---|
105 | |
44 | |
39 | |
39 | |
39 |