Forum Discussion
norbi
Helper I
8 years agoMeasures for Customer Trends
Hi, I would appreciate assistance in solving the percentage Month on Month (MoM) growth, percentage Year on Year (YoY) growth and percentage of 3 month average. Below is the table where the input is...
Zubair_Muhammad
Community Champion
8 years agoHi norbi
Try this Measure for MoM
MoM =
DIVIDE (
SUM ( TableName[Vol] ),
CALCULATE (
SUM ( TableName[Vol] ),
FILTER (
ALLEXCEPT ( TableName, TableName[Name] ),
TableName[Date] = PREVIOUSMONTH ( VALUES ( TableName[Date] ) )
)
)
)
- 1Zubair_Muhammad
Community Champion
8 years ago
This Measure for YoY
YoY =
DIVIDE (
SUM ( TableName[Vol] ),
CALCULATE (
SUM ( TableName[Vol] ),
FILTER (
ALLEXCEPT ( TableName, TableName[Name] ),
YEAR ( TableName[Date] )
= YEAR ( SELECTEDVALUE ( TableName[Date] ) ) - 1
&& MONTH ( TableName[Date] ) = MONTH ( SELECTEDVALUE ( TableName[Date] ) )
)
)
)
- 1- Zubair_Muhammad8 years ago
Community Champion
Final one
% of 3 month_average = DIVIDE ( SUM ( TableName[Vol] ), CALCULATE ( AVERAGE ( TableName[Vol] ), DATESINPERIOD ( TableName[Date], SELECTEDVALUE ( TableName[Date] ), -3, MONTH ) ) )- Zubair_Muhammad8 years ago
Community Champion
- norbi8 years ago
Helper I
Hi Zubair_Muhammad,
Thank you for the feedback it works well, however how would you achieve the sum of the Customers if there are more than one in a month? E.g.
Date
Name
Vol
Jan-16
Cust_1
3
Jan-16
Cust_2
4
Jan-16
Cust_3
1
Jan-16
Cust_4
2
Feb-16
Cust_1
2
Feb-16
Cust_2
1
Feb-16
Cust_3
3
Feb-16
Cust_4
6
…..