Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.