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
TBSST
Frequent Visitor

Grouping dates in a bar chart by month

Hi All, 

 

I am trying to create a bar chart to show the number of responses by month. The two colums i have is response ID's (y-Axis) and response date (X axis, format dd-mmm-yyyy). 

 

I am wanting to group the dates together so the bar chart is showing responses in a month, not an indiidual day. The response date data type is set to date/time. 

 

Any help would be appreciated. 

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Seperate time from the Date/Time column.  Create a Calendar Table and then a relationship from the Date column of the Data Table to the Date column of the Calendar Table.  In the Calendar Table, create calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number.  To your visual, drag Year and Month name from the Calendar Table.  Write this measure

Measure = countrows(Data)

Hope this helps.


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

View solution in original post

Ritaf1983
Super User
Super User

Hi @TBSST 
If you working with 1 table of fact :
You can add a column with the month:

Ritaf1983_1-1694142268234.png

and put it to X axis

Ritaf1983_2-1694142363639.png

 

The best Practise to work with dates is to create a date table and "use" it :

Ritaf1983_0-1694142803576.pngRitaf1983_1-1694142843266.png

Link to a sample file with both options 

For more informations about dates table:

https://www.datacamp.com/tutorial/how-to-create-date-tables-in-power-bi-tutorial

 

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ritaf1983
Super User
Super User

Hi @TBSST 
If you working with 1 table of fact :
You can add a column with the month:

Ritaf1983_1-1694142268234.png

and put it to X axis

Ritaf1983_2-1694142363639.png

 

The best Practise to work with dates is to create a date table and "use" it :

Ritaf1983_0-1694142803576.pngRitaf1983_1-1694142843266.png

Link to a sample file with both options 

For more informations about dates table:

https://www.datacamp.com/tutorial/how-to-create-date-tables-in-power-bi-tutorial

 

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ashish_Mathur
Super User
Super User

Hi,

Seperate time from the Date/Time column.  Create a Calendar Table and then a relationship from the Date column of the Data Table to the Date column of the Calendar Table.  In the Calendar Table, create calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number.  To your visual, drag Year and Month name from the Calendar Table.  Write this measure

Measure = countrows(Data)

Hope this helps.


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

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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