Forum Discussion
Katerina_e
9 years agoFrequent Visitor
YoY / MoM / QoQ % change calculation
Hello, everybody! I think I need to calculate a very typical measure, and I get plenty of options on web, but nothing seems to work so far. I need to calculate YoY, MoM, QoQ % changes of sale...
TomMartens
Super User
9 years agoHey,
here you will find a pbix file
This file contains a report page "MOM", here you will find a matrix visul that contains a measure (table: FactWithDates) called MOM Growth:
MOM Growth =
DIVIDE((CALCULATE(SUM(FactWithDates[Amount]))-CALCULATE(SUM(FactWithDates[Amount]),DATEADD('Calendar'[Date],-1,MONTH)))
,(CALCULATE(SUM(FactWithDates[Amount]),DATEADD('Calendar'[Date],-1,MONTH))),BLANK())*100
Maybe this provides what you are looking for.
Hope this helps
abhilash2612
5 years agoRegular Visitor
Hi,
I did calculate the percentage increase by month (mom%), but the increased and decreseaed percentages are displayed in current column which should have been the next
for example:
jan 50
feb 100
got:
jan feb
100%
exepected
jan feb
anyvalue 100%
measure:
Fare/Subsidy MoM% =
IF(
ISFILTERED('Query1'[TripTime]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
VAR __PREV_MONTH =
CALCULATE(
SUM('Query1'[Fare/Subsidy]),
DATEADD('Query1'[TripTime].[Date], -1, MONTH)
)
RETURN
DIVIDE(SUM('Query1'[Fare/Subsidy]) - __PREV_MONTH, __PREV_MONTH)
)
Thanks
Abhilash