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.
Hi,
I need to calculate Weeks of Inventory. Which logic is (last Sunday value)/avg(last 4 Sunday's value)
Could you please help me to get last Sunday's value? My data is the date-level granularity and I need to consider only every Sunday values.
as in the below image, I need to calculate (189118738- last Sunday)/avg(last 4 Sundays value highlighted)
@tulasi_pbi1988 , The way I will approch, Create Date table, Create sunday week start date
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],1)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],1)
Create Rank on week start date
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
Last Sunday Week =CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank]) && 'Date'[Date] = 'Date'[Week Start date]))
Last 4 week =
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]>=max('Date'[Week Rank])-5 && 'Date'[Week Rank]<=max('Date'[Week Rank])-1 && 'Date'[Date] = 'Date'[Week Start date]))
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |