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.
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
)
)
Solved! Go to Solution.
If you change
DATEADD('DimDate'[Date].[Date], -1, MONTH)
to
DATEADD('DimDate'[Date], -1, MONTH)
does that work?
If you change
DATEADD('DimDate'[Date].[Date], -1, MONTH)
to
DATEADD('DimDate'[Date], -1, MONTH)
does that work?
That helped.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.