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
Vari209
Frequent Visitor

Week Over Week Percentage Change in a table or Matrix table by Supplier or Department

I hope everyone had a great weekend! 😊

 

Would anyone know how to show WoW percent change for a specific grouping in a table or matrix table? - for example the screen shot below in excel (example only not real totals) is showing Facebook current week amount total for 91-180 days is $4M and the % change from the previous week is -4%. How would I show this exact example in a table or matrix table in PowerBi. I was able to show this is in a graph (screenshot below) and when you filter by a dept. or supplier the totals reflect the change. 

My issues is when I tried to display the current week total, previous week total and the WoW % percent change (DAX (Current week-Previous week) / Previous week) - by supplier or dept. it returns duplicate totals. I also tried bucketing the 91-180 days and then bringing into a table which is fine, but the totals were still duplicated. Would any one be able to help me with this please? 

 

Dax I used for the graph: 

Measure =

VAR lastWeekAmount =

    CALCULATE (

        SUM ( Append1[Video Views] ),

        FILTER (

            ALL ( 'Calendar' ),

            'Calendar'[WeekNum]

                = MIN ( 'Calendar'[WeekNum] ) - 1

        )

    )

RETURN

    DIVIDE (SUM (Append1[Video Views] ) - lastWeekAmount, lastWeekAmount, 0 )

 

Vari209_0-1675693516929.png

 

 

Want I would love to see in powerBi, the below is an example (not real totals) of what I would like the table to show in powerBi:

 

Vari209_1-1675693526438.png

 

Any help is greatly appreaciated!! 😊

2 REPLIES 2
amitchandak
Super User
Super User

@Vari209 , Please use a separate Week/date table and use the week rank

 

Have these new columns in Date Table, Week Rank is Important in Date/Week Table
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

Have these new columns in Date Table, Week Rank is Important in Date/Week Table

Week Rank = RANKX('Date','Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX('Date','Date'[Year Week],,ASC,Dense) //YYYYWW format

 

These measures can help
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))

 

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-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

Hi Amitchandak, 

 

Thank you for the quick reply! I have already been able to create a table with current week, previous week and WoW % change, but thats not what I was looking to do. 

 

I was able to complete this view previously in the below screenshot, but not what I am looking for. 

 

Vari209_0-1675699895662.png

 

I am looking to have a table or Matrix table to view the following in Power Bi. When I try to list the supplier it duplicates values. Want I would love to see in powerBi, the below is an example (not real totals) of what I would like the table to show in powerBi: 

 

Vari209_1-1675700041687.png

 

Looking forward to hearing back from you! 🙂

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.