Forum Discussion
Power BI Weekly report
Hello community experts,
Need to calculate the weekly target reports (we have a measure for monthly targets) where the logic for weeks that are in common between 2 months should be: Week should share the target of the month which more days are in common.
Example: WK 13 should have March target (4 days vs 3 days)
Please help.
Thank you.
Regards,
Anirban
3 Replies
- amitchandakSuper User
Anonymous , refer if this blog can help
Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-Convert-to/ba-p/1657798
or distribute using month start and end date
- AnonymousNot applicable
Thanks for your blog, Amit.
But the daily target has already been implemented, I am looking for the weekly targets with the logic mentioned in my original post. Can you please help me on that thing? Thanks again.
- amitchandakSuper User
Anonymous , You can simply use this week vs last week kind of measures
new columnsWeek Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],1)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],1)Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
measures
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))See if this can help