cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JeffatHero Regular Visitor
Regular Visitor

Quick Measure MoM% showing 0.00%, how to fix?

I'm trying to visualize Google Analytic pageviews month over month percentage change. The quick measure gives me value of 0%. I'm using a DimDate table with a date hierarchy. I'm not sure where the problem is. 

 

My goal: compare the total pageviews this month as a percentage of change vs last month's total pageviews. 

 

The measure:

Pageviews MoM% =
IF(
ISFILTERED('DimDate'[Date]),
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('FactSCRAMAnalytics'[Pageviews]),
DATEADD('DimDate'[Date].[Date], -1, MONTH)
)
RETURN
DIVIDE(
SUM('FactSCRAMAnalytics'[Pageviews]) - __PREV_MONTH,
__PREV_MONTH
)
)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Quick Measure MoM% showing 0.00%, how to fix?

If you change

 

DATEADD('DimDate'[Date].[Date], -1, MONTH)

 

to

 

DATEADD('DimDate'[Date], -1, MONTH)

 

does that work?

2 REPLIES 2

Re: Quick Measure MoM% showing 0.00%, how to fix?

If you change

 

DATEADD('DimDate'[Date].[Date], -1, MONTH)

 

to

 

DATEADD('DimDate'[Date], -1, MONTH)

 

does that work?

JeffatHero Regular Visitor
Regular Visitor

Re: Quick Measure MoM% showing 0.00%, how to fix?

That helped.