Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I'm new on power bi and I was working on a weekly coverage report that shows the number of outlets visited per week. To do this I applied a filter to show outlets covered on the first week, second week, and so on. However I'm unable to show all that in the same visual, all I can do is show a visual for each week.
I would really appreciate if I found a way to sort this out. Thanks.
Solved! Go to Solution.
@Kaskazi_Network , you can create week in date table and plot that in visual
or can have measures for this week, last week etc
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...
This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
2nd Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-2))
Hi, @Kaskazi_Network
Based on your description, I created data to reproduce your scenario. The pbix file is attacehed in the end.
Table::
You may create a calculated column or a measure as below.
Calculated column:
YearWeeknum = YEAR('Table'[Date])*100+WEEKNUM('Table'[Date])
Measure:
Result = DISTINCTCOUNT('Table'[ID])
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Kaskazi_Network , you can create week in date table and plot that in visual
or can have measures for this week, last week etc
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...
This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
2nd Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-2))
You need to create a calendar table
-https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns
- Join this Calendar table with your table on Dates
- Mark Calendar table as "Date Table"
- Use Week from Calendar table to view weekly data.
Proud to be a Super User!