Forum Discussion
Calculate Measure1 as Measure2 + Measure3 Running Total
- 2 years ago
Click here to download the solution
How it works ...
Create a Calandar tableCreate a measure
YTD cumulative = VAR myyear = SELECTEDVALUE('Calendar'[Year]) VAR myperiod = MAX('Calendar'[Date]) RETURN CALCULATE( SUM(Facts[Amount in company currency]), ALL('Calendar'), 'Calendar'[Year] = myyear && 'Calendar'[Date] <= myperiod )Dsiplay in matrix
Thanks for the clear description of the problem with example data. I wish everyone did that!
Remember we are unpaid volunteers. So please click the thumbs up and the [accept as solution] button to leave kudos.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
If you quote speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.
Please now click the thumbs up and the [accept as solution] button. Thnak you.
speedramps, at the very bottom is a data sample.
Needed:
- one measure = sum of Amount per year, quarter and month (date hierarchy) - in matrix;
- one measure = cummulative sum of Amount per year, quarter and month;
- desired output (cummulative sum of last month of q is equal to cummulative sum of q) right below. I hope it makes sense.
| Sum | Cummulative Sum | |
| Jan | 10 | 10 |
| Feb | 30 | 40 |
| Mar | 60 | 100 |
| Total Q1 | 100 | 100 |
| Apr | 30 | 130 |
| May | 25 | 155 |
| Jun | 20 | 175 |
| Total Q2 | 75 | 175 |
| Record ID | Deal Name | Pipeline | Deal Stage | Amount in company currency | Close Date | Inactive Date |
| 15860859474 | Deal no. 142 | Renewals - ARR | >365 Days | 1994 | 2024-12-01 02:00 | 2024-12-01 |
| 15842177351 | Deal no. 124 | Renewals - ARR | <365 Days | 1518 | 2024-11-01 02:00 | 2024-11-01 |
| 15678677277 | Deal no. 40 | Renewals - ARR | <365 Days | 999 | 2024-10-01 03:00 | 2024-10-01 |
| 15611462181 | Deal no. 269 | Renewals - ARR | >365 Days | 995 | 2026-09-05 03:00 | 2026-09-05 |
| 15557243932 | Deal no. 282 | Renewals - ARR | <365 Days | 928 | 2024-11-01 02:00 | 2024-11-01 |
| 15541818683 | Deal no. 83 | Renewals - ARR | <365 Days | 524 | 2024-11-01 02:00 | 2024-11-01 |
| 15516131724 | Deal no. 195 | Renewals - ARR | >365 Days | 1529 | 2026-10-01 03:00 | 2026-10-01 |
| 15425010614 | Deal no. 246 | Renewals - ARR | <365 Days | 1830 | 2024-11-01 02:00 | 2024-11-01 |
| 15421474859 | Deal no. 154 | Renewals - ARR | >365 Days | 1824 | 2025-01-01 02:00 | 2025-01-01 |
| 15412867601 | Deal no. 77 | Renewals - ARR | <180 Days | 1214 | 2024-03-10 02:00 | 2024-03-10 |
| 15279595559 | Deal no. 193 | Renewals - ARR | <90 Days | 1027 | 2024-01-01 02:00 | 2024-01-01 |
| 15164440081 | Deal no. 58 | Renewals - ARR | <270 Days | 1334 | 2024-06-01 03:00 | 2024-06-01 |
| 15164232203 | Deal no. 119 | Renewals - ARR | <90 Days | 846 | 2024-01-01 02:00 | 2024-01-01 |
| 15118337967 | Deal no. 51 | Renewals - ARR | >365 Days | 716 | 2026-03-01 02:00 | 2026-03-01 |
| 14994331225 | Deal no. 118 | Renewals - ARR | <180 Days | 654 | 2024-03-01 02:00 | 2024-03-01 |
| 14992063493 | Deal no. 67 | Renewals - ARR | <90 Days | 1418 | 2024-01-01 02:00 | 2024-01-01 |
| 14982132624 | Deal no. 173 | Renewals - ARR | <270 Days | 506 | 2024-07-01 03:00 | 2024-07-01 |
| 14981603117 | Deal no. 208 | Renewals - ARR | <365 Days | 1078 | 2024-09-01 03:00 | 2024-09-01 |
| 14980389804 | Deal no. 288 | Renewals - ARR | <30 Days | 1350 | 2023-10-01 03:00 | 2023-10-01 |
| 14932638466 | Deal no. 270 | Renewals - ARR | <30 Days | 516 | 2023-09-01 03:00 | 2023-09-01 |
| 14873726787 | Deal no. 263 | Renewals - ARR | <180 Days | 1693 | 2024-03-01 02:00 | 2024-03-01 |
| 14824777142 | Deal no. 106 | Renewals - ARR | <180 Days | 615 | 2024-04-01 03:00 | 2024-04-01 |
Click here to download the solution
How it works ...
Create a Calandar table
Create a measure
YTD cumulative =
VAR myyear = SELECTEDVALUE('Calendar'[Year])
VAR myperiod = MAX('Calendar'[Date])
RETURN
CALCULATE(
SUM(Facts[Amount in company currency]),
ALL('Calendar'),
'Calendar'[Year] = myyear &&
'Calendar'[Date] <= myperiod
)
Dsiplay in matrix
Thanks for the clear description of the problem with example data. I wish everyone did that!
Remember we are unpaid volunteers. So please click the thumbs up and the [accept as solution] button to leave kudos.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
If you quote speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.
Please now click the thumbs up and the [accept as solution] button. Thnak you.
- niculeica2 years agoHelper IThank you, speedramps! I was able to put the solution to use.