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
gerasimovav
Helper III
Helper III

How to view this year dynamic per months? (Comulative Total per months)

Hello colleagues!

I often have to do similar task.

For example, we register incidents every day.

I can count incident by countrows measure, then put diagram: X axis is month and Y axis is amount of incident. 

For example, 5 in January, 3 in February, 2 in March...

There is no problem if I want to view amount of incident every months.

But if i want to view number of incident from the start of the year till the end of every month:

for example January - 5, February 8 (5+3), March 10 (5+3+2) - it is very difficult.

How can I plot this graph?

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Create a Calendar Table and write the following calculated column formulas there.

 

Year=Year(Calendar[Date])

Month=FORMAT(Calendar[Date],"mmmm")

 

Build a relationship from the Date column of the base Data Table to the Date column of the Calendar Table.  In your Table visual, drag the Year and Month from the Calendar Table.  Write these measures:

 

Incidents = COUNTROWS(Data)

Incidents YTD = CALCULATE([Incidents],DATESYTD(Calendar[Date],"31/12")

 

Your Months on the x-axis will not be in order.  Just Google for how to get months in order in PowerBI desktop and yo will be able to see the simple procedure.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

11 REPLIES 11

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.