Forum Discussion
Anonymous
4 years agoNot applicable
Relative Date Calculations Using Variables
Hi All, Trying to come up with a series of measures which could accomplish the following 1. Sum of Quantity of Previous 1 Month (from a given date) * weight factor (1.2) 2. Sum of Quanity of Pr...
Anonymous
4 years agoNot applicable
Please Try this measure
Note:- This measure for only last month for more use can change -1 to -3,-6, and more.
Measure1 =
VAR P_ONEMONTH =
CALCULATE (
SUM ( 'Date'[Total Qty] ),
DATEADD ( 'Date'[Date], -1, MONTH )
)
RETURN
P_ONEMONTH * 0.8:- When you put this measure into a line graph the first month does not appear because the first month did not contain data to show that month you can use this measure.
Measure =
VAR P_OneMonth =
CALCULATE (
SUM ( 'Date'[Total Qty] ),
DATEADD ( 'Date'[Date], -1, MONTH )
)
VAR Result = one * 0.8
RETURN
IF ( Result = BLANK (), 0, Result )If I did not get your requirement please correct me.
Anonymous
4 years agoNot applicable
This did not work - I will post more information as well as trying a different route to add dates.