Forum Discussion
Anonymous
8 years agoNot applicable
Formula Help
I have this table: I am attempting to put together a formula that looks at the latest month for a record and calculates the sum of revenue for that month and multiply it by 12. So in this...
Zubair_Muhammad
8 years agoCommunity Champion
Anonymous
Try this MEASURE
Measure =
VAR lastmonth =
MONTH ( LASTDATE ( Table1[Revenue_Date__c] ) )
VAR lastyear =
YEAR ( LASTDATE ( Table1[Revenue_Date__c] ) )
RETURN
CALCULATE (
SUM ( Table1[Revenue_Amount__c] ),
YEAR ( Table1[Revenue_Date__c] ) = lastyear
&& MONTH ( Table1[Revenue_Date__c] ) = lastmonth
)
- Anonymous8 years agoNot applicable
Zubair_Muhammad Not quite. It just matched the grand total of Revenue Column:
- v-xjiin-msft8 years agoSolution Sage
Hi Anonymous,
Zubair_Muhammad's solution should work for you.
Then based on your screenshot, it seems like you are creating a calculated column not a measure. Right? Please refer to following sample, and you can find out the difference between calculated column and measure.
By the way, they are using the same expression:
Thanks,
Xi Jin.- Anonymous8 years agoNot applicable
v-xjiin-msft not sure what I'm doing wrong: