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
danzrust
Helper IV
Helper IV

Week Over Week Calculations

Hi guys,

There are few similar topics on this forum, but I have a feeling the all of them are trying to solve slighly different scenarios.

 

I am playing with MoM and WoW calculations.

 

I was able to do MoM via "Quick Measures" (in beta, you need to activate it). 

 

I was then hoping I would take the MoM expression and edit it slighly to create WoW.

 

This is the DAX expression Power BI generates for MoM:

Leads MoM% =
IF(
ISFILTERED('Calendar'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy."),
VAR __PREV_MONTH =
CALCULATE(
SUM('FactTable'[Leads]),
DATEADD('Calendar'[Date].[Date], -1, MONTH)
)
RETURN
DIVIDE(SUM('FactTable'[Leads]) - __PREV_MONTH, __PREV_MONTH)
)

 

I found out that making WoW out of this is more difficult than expected.

 

I guess I need to edit this piece: DATEADD('Calendar'[Date].[Date], -1, MONTH)

 

The problem is that you CANNOT use WEEK instead of MONTH. WEEK is not supported.

 

So what do I need to put there to get WoW calculation?


DZ

12 REPLIES 12

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.