Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
jeffshieldsdev
Solution Sage
Solution Sage

If you change

 

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

 

to

 

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

 

does that work?

View solution in original post

2 REPLIES 2
jeffshieldsdev
Solution Sage
Solution Sage

If you change

 

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

 

to

 

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

 

does that work?

Anonymous
Not applicable

That helped.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors