Forum Discussion
tmears
Helper III
6 years agoMAT
Hi all I want to calcuate the last 12 month Moving Annual totals, which i am using the following which is working. What i am struggling with is a measure or comparrision against the same period las...
- 6 years ago
For that one you can put in the IF ( ISBLANK () from your original:
Mat Volumn 12 = VAR _DateEnd = LASTDATE ( VRS[VRS Date] ) RETURN IF ( ISBLANK ( [Net Sales] ), BLANK(), CALCULATE ( [Net Sales], ALL ( VRS ), DATESINPERIOD ( VRS[VRS Date], _DateEnd, -12, MONTH ) ) )
tmears
Helper III
6 years agojdbuchanan71
Super User
6 years agoFor that one you can put in the IF ( ISBLANK () from your original:
Mat Volumn 12 =
VAR _DateEnd =
LASTDATE ( VRS[VRS Date] )
RETURN
IF ( ISBLANK ( [Net Sales] ), BLANK(),
CALCULATE (
[Net Sales],
ALL ( VRS ),
DATESINPERIOD ( VRS[VRS Date], _DateEnd, -12, MONTH )
)
)
- tmears6 years ago
Helper III
jdbuchanan71you are a star, thank you so much!! Not sure if i can push my luck, i also need to do this calculation based upon the customer called buying group. but obviously if i bring in the 'buying group' it returns a total sum. the customer called buying group. but obviously if i bring in the 'buying group' it returns a total sum.
- jdbuchanan716 years ago
Super User
Change the ALL ( VRS ) to ALL ( VRS[VRS Date] ) which should repect the other filters.
- tmears6 years ago
Helper III
thank you so much..... you hero status in my office at the moment!!