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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
glynwilks
Helper I
Helper I

Show of tickets entered by day of the week

Hi Guys,

 

I am just starting out with PowerBi and I am looking to build a chart that visualises the number of tickets created by date and then represent the information as sum of tickets created per day of the week. That way I can get insights into what day's of the week on average are our busiest.

 

I currently have one query for tickets (pulling from ConnectWise) which contains date entered, and my second query is a rolling calendar where the date field is linked to the ticket date entered field.

 

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @glynwilks ,

 

I suggest use the following formula to create rolling calendar to contain weekday information:

 

Calendar = ADDCOLUMNS(CALENDAR(DATE(2020,1,1),DATE(2020,12,31)),"DayOfWeek", FORMAT ( [Date], "dddd" ))

 

 

Capture3.PNG

 

Then you can use the following measure to calculate average tickets created by weekday:

 

Measure = AVERAGEX(ALLEXCEPT('Calendar','Calendar'[DayOfWeek]),COUNT('Table'[Ticket]))

 

 

If it doesn't meet your requirements, please show us some sample data and your expected output.

 

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

 

Best Regards,

Dedmon Dai

 

 

 

View solution in original post

4 REPLIES 4
v-deddai1-msft
Community Support
Community Support

Hi @glynwilks ,

 

Is there any update?

 

Best Regards,

Dedmon Dai

 

v-deddai1-msft
Community Support
Community Support

Hi @glynwilks ,

 

I suggest use the following formula to create rolling calendar to contain weekday information:

 

Calendar = ADDCOLUMNS(CALENDAR(DATE(2020,1,1),DATE(2020,12,31)),"DayOfWeek", FORMAT ( [Date], "dddd" ))

 

 

Capture3.PNG

 

Then you can use the following measure to calculate average tickets created by weekday:

 

Measure = AVERAGEX(ALLEXCEPT('Calendar','Calendar'[DayOfWeek]),COUNT('Table'[Ticket]))

 

 

If it doesn't meet your requirements, please show us some sample data and your expected output.

 

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

 

Best Regards,

Dedmon Dai

 

 

 

Thanks Dedmon,

 

I will give this is a shot shortly and let you know how I go.

amitchandak
Super User
Super User

@glynwilks , You can create a date calendar there you can create week related columns and analyse by week

 

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)

 

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

 

 


This Week Avg= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))/

CALCULATE(distinctcount('Date'[Date]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week Avg= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

/

CALCULATE(distinctcount('Date'[Date]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))

 

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.