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

Using same data fields more than one once on the same visual

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.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Kaskazi_Network , you can create week in date table and plot that in visual

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

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))

 

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Kaskazi_Network 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attacehed in the end.

 

Table::

e1.png

 

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:

e2.png

 

e3.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Kaskazi_Network , you can create week in date table and plot that in visual

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

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))

 

FarhanAhmed
Community Champion
Community Champion

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.

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




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.

Top Solution Authors