Forum Discussion
Week Over Week Change for Scorecards
Hi everyone!
New to the forums and looking for some help.
I'm trying to have a WoW percent change scorecard underneath the main KPI scorecard, but having an issue with it returning the total result instead of the individual row result. Here is an example screenshot:
Ignore the (Blank). Those are from a previous build where I was doing MoM using Parallelperiod, which works great. Unfortunately Parallelperiod doesn't, currently, support Weeks so this is not an option, to my knowledge.
As for my calculations:
Oneview_Previous_Week_Percent_Impressions = CALCULATE(DIVIDE(SUM(Oneview[Oneview_Impressions])-[Oneview_Previous_Week_Impression],[Oneview_Previous_Week_Impression],0))
5 Replies
- bhanu_gautamSuper User
gelkins81 Calculate the Previous Week Impressions:
Oneview_Previous_Week_Impression =
CALCULATE(
SUM(Oneview[Oneview_Impressions]),
FILTER(
Oneview,
Oneview[YearWeek] = EARLIER(Oneview[YearWeek]) - 1
)
)Calculate the WoW Percent Change:
Oneview_Previous_Week_Percent_Impressions =
DIVIDE(
SUM(Oneview[Oneview_Impressions]) - [Oneview_Previous_Week_Impression],
[Oneview_Previous_Week_Impression],
0
)- gelkins81New Member
Thanks for such a quick response!
I did try this solution, but am getting an error with the Earlier function:
Thoughts? Sorry, I am somewhat new to Dax as I used Tableau at my previous agency and where I am now uses PowerBi. I've learned a lot over the past 6 months, but there's a lot of different functions that I just don't know about yet. Thanks!
- bhanu_gautamSuper User
Use DATE ADD instead of earlier
dax
Oneview_Previous_Week_Impression =
CALCULATE(
SUM(Oneview[Oneview_Impressions]),
DATEADD(Oneview[Date], -7, DAY)
)