Forum Discussion
Week Over Week Change for Scorecards
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
)
- gelkins811 year agoNew 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_gautam1 year agoSuper User
Use DATE ADD instead of earlier
dax
Oneview_Previous_Week_Impression =
CALCULATE(
SUM(Oneview[Oneview_Impressions]),
DATEADD(Oneview[Date], -7, DAY)
)- gelkins811 year agoNew Member
This is outputting the wrong amount:
When I don't have the filter, the table outputs the correct amount on the row, but not at the total. I need to figure out a way to output the row amount and not the total.