Forum Discussion
BrianNeedsHelp
Resolver I
1 year agoApply Month Calculation to Row Without Changing Month Calculation
I have this measure: MonthChange = sumx(VALUES('Calendar'[Month Year]),[Gross Adds]- CALCULATE([Gross Adds],SAMEPERIODLASTYEAR('Calendar'[Calendar Date])))/sumx(VALUES('Calendar'[Month Y...
Anonymous
1 year agoNot applicable
Hi BrianNeedsHelp , hello sanalytics and Irwan , thank you for your prompt reply!
Please try this:
% Applied =
VAR OverallMonthChange =
CALCULATE(
SUMX(VALUES('Calendar'[Month Year]), [Gross Adds] - CALCULATE([Gross Adds], SAMEPERIODLASTYEAR('Calendar'[Calendar Date])))
/ SUMX(VALUES('Calendar'[Month Year]), [Gross Adds]),
ALL('Calendar'[Calendar Date])
)
RETURN
[PYSalesByWeek] + (OverallMonthChange * [PYSalesByWeek])
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BrianNeedsHelp
Resolver I
1 year agoPerhaps I can explain it better with the table: The formula you have will return different % based on the row. Let's exclude the calculation you have in the Return and just Return Overall Month Change like I have below.
| PYSalesByWeek | Week Ending Date | Gross Adds | % Applied (Return of "Overall Month") |
| 4530 | 10/6/2024 0:00 | 2973 | -0.09 |
| 3673 | 10/13/2024 0:00 | 3013 | 0.05 |
| 2917 | 10/20/2024 0:00 | 2931 | -0.01 |
| 2948 | 10/27/2024 0:00 | 2722 | -0.08 |
| 2911 | 11/3/2024 0:00 | 1753 | 0.01 |
Do you see how that equates to different %'s in each row? That's what I'm trying to avoid. I was trying to get the overall Month Change which is like -2% and multiply -2% * each row. All of the formulas tried result in the exact same -they apply logic to the row. Make sense?