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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
abalgir
Helper I
Helper I

Count number of rows per Month

Hello,

 

I am new to Power BI and trying to do the following:

 

I have a table loaded from Postgres db. The table lists rows with each row having a booking date with the following format (UTC) :

2019-01-19 17:09:38 and a status field

 

I am trying to get a simple measure : count number of rows with status="NEW" grouped by month (Jan, Feb, Mar,...Dec).

 

I read several answers and none really worked.

 

=MONTH(_AllDataRaw[origin_trx_booking_time_stamp]) 

gives me a numeric 1, however I do not know how to convert 1 to Jan.

 

I saw an answer to use FORMAT in order to get the month as Jan, Feb,...

 
= FORMAT(MONTH(_AllDataRaw[origin_trx_booking_time_stamp]),"MMM")
 
however it returns Dec for the date 2019-01-19 17:09:38 !!!
 
I am trying to achive something like this:
 
Month       #Trx
Jan             15
Feb             76
Mar             10
 
Any help is appreciated.
 
Thank you
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

The easiest way to achieve what you want to do is to create a Table visual (Table or Matrix) that shows your months on a row by row basis.  The data value can then just be whichever column you want to count.  The visual filter would be on the column that contains the "=new".

 

Putting all of those contexts together you will get a count of new per month.

 

If you don't have the month information handy, a "Date Table" will likely be your solution there.  A quick google search of creating a date table should give you the code you can copy in for that part of the soultion.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

The easiest way to achieve what you want to do is to create a Table visual (Table or Matrix) that shows your months on a row by row basis.  The data value can then just be whichever column you want to count.  The visual filter would be on the column that contains the "=new".

 

Putting all of those contexts together you will get a count of new per month.

 

If you don't have the month information handy, a "Date Table" will likely be your solution there.  A quick google search of creating a date table should give you the code you can copy in for that part of the soultion.

Thank you i will search and test this

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors