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
MAkiva1
Helper I
Helper I

Summarizing Data by Month and Year

Hi, I'm new to Power Bi.  I'd like to summarize my daily intake of new clients in a table or matrix and display the data by month and year.  I have one column, "RetDat" that displays the intake date in the following format: mm/dd/yyyy, time.  How can I sum up the data by month and then by year?

 

For instance, what I'd like to see is:

 

2016

Jan: 50

Feb: 45

Mar: 53

.....

2017

Jan: 55

....

1 ACCEPTED SOLUTION

Hi @MAkiva1,

 

As smoupre said, you can simply use matrix to achieve your requirement.

 

Steps:
1. Switch date to hierarchy mode, keep year and month.
2. Drag date to value field and change the summary mode to count.

Capture.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

When you import your data, Power BI should recognize the date time field and create an automatic date hierarchy for you. You then just need to drop that hierarchy into a matrix or line chart or column chart along with your value that you want to display.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I tried this and I received a list of all dates from the database -- it wasn't organized by year or month.  I'm using DirectQuery, not Import.  

Hi @MAkiva1,

 

As smoupre said, you can simply use matrix to achieve your requirement.

 

Steps:
1. Switch date to hierarchy mode, keep year and month.
2. Drag date to value field and change the summary mode to count.

Capture.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.