cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mkranitz Frequent Visitor
Frequent Visitor

Comparing count of tickets by month between last year and this year in column chart

Hi guys,

 

I'm still a noob, and have looked through the forums and can't seem to find out how to do something you guys will think is relatively simple!

 

I'm trying to create a graph that shows each month of the year along the x axis. The Y axis will show a count of tickets.

 

I want to know how to create stacked column chart that shows the number of tickets last year vs tickets this year for each month. 

 

I have a single table that I export from an application. The table has two values that I would use for this:

  • Ticket, which is the ticket number
  • Entered, which is the date the ticket was entered

I think I need to create a measure or something that shows all 2018 tickets, and another measure that shows all 2019 tickets and then add them both to the value field of a power bi object, but I haven't been able to crack it!

 

I basically want the following table but instead of $, I want a count of tickets by month for each year.yearcompare.png

1 ACCEPTED SOLUTION

Accepted Solutions
Akshaya Established Member
Established Member

Re: Comparing count of tickets by month between last year and this year in column chart

@mkranitz  Could you show how your data set looks? 

 

If you had ticket numbers as a field and you can add another field called Year and month from the date column you might have .. so it would look like this.. 

 

BarGraph_1.PNG

So you could create a new column in your table and type the DAX as follows:

YEAR = year(Table[Date]) and

MONTH = Month (Table[Date]) to look as the above screenshot

And then you could choose any bargraph type you want in Power BI ( I have just put multiple types for the same data for more visual options!)

 

BarGraph_2.PNG

 

 

 

View solution in original post

3 REPLIES 3
Akshaya Established Member
Established Member

Re: Comparing count of tickets by month between last year and this year in column chart

@mkranitz  Could you show how your data set looks? 

 

If you had ticket numbers as a field and you can add another field called Year and month from the date column you might have .. so it would look like this.. 

 

BarGraph_1.PNG

So you could create a new column in your table and type the DAX as follows:

YEAR = year(Table[Date]) and

MONTH = Month (Table[Date]) to look as the above screenshot

And then you could choose any bargraph type you want in Power BI ( I have just put multiple types for the same data for more visual options!)

 

BarGraph_2.PNG

 

 

 

View solution in original post

mkranitz Frequent Visitor
Frequent Visitor

Re: Comparing count of tickets by month between last year and this year in column chart

Hi Akshaya,

Thank you for your response - it makes perfect sense.

Following are the relevant fields from the table named "Tickets"

Fields.png

A little wrangling and I think I got it! 🙂 🙂

 

THANK YOU 🙂

mkranitz Frequent Visitor
Frequent Visitor

Re: Comparing count of tickets by month between last year and this year in column chart

YES!

Your guidance got me where I needed to go Cat Happy

The stuff I learned while trying to figure out how to do what you suggested was especially helpful!

 

MANY THANKS 🙂

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,262)