Forum Discussion
Compare column value in a matrix visual
Hello,
I have created the following matrix visual
Rows
Author
Columns
Week = nw_content[nw_c_publishdate]-WEEKDAY(nw_content[nw_c_publishdate],3)
Value
Pageviews
Which you can see below:
What i want do is to be able to compare each column with previous. For example compare 194.008 to 122.516. I have found how to compare with previous day,month etc or another column but can't work out how to compare with the previous column (week). Any help appeciated!
p.s.
this is something i easily do at excel with the following:
Thank you!
1 Reply
- amitchandak
Super User
polman4 , if you want to compare this week vs last week, You can have following columns in date table
new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW formatThen measure like
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))You can take diff for WOW
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8