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

Creating a count when dates within a particular month - Stacked bar chart

I’m trying to add a stacked bar chart visual which provides a count of the number of projects per month which meet certain planned milestones dates. If the date falls within that month, I want to add 1 to the count for that particular month.

 

Example dataset which contains the same fields as my real table below. Also provided an example of the visual I’m looking to achieve.

 

How am I best to try and achieve this within PowerBI please?

 

Thanks again,

 

 

Dataset

    

 

GW1 Paper Completion Planned

GW2 / Award Paper Draft Target Complete

GW3 Draft Target Complete

Contract Signed/Project Completion Date (Planned)

Project A

22/05/2021

30/07/2021

12/09/2021

20/11/2021

Project B

20/09/2021

01/02/2022

22/02/2022

30/05/2022

Project C

18/06/2021

19/06/2021

15/09/2021

11/10/2021

 

stokidez_1-1621543631907.png

 

Formatted table in order to create visual above in excel

 

GW1

GW2

GW3

Contract Signed

May-21

1

 

 

 

Jun-21

1

1

 

 

Jul-21

 

1

 

 

Aug-21

 

 

 

 

Sep-21

1

 

2

 

Oct-21

 

 

 

1

Nov-21

 

 

 

1

Dec-21

 

 

 

 

Jan-22

 

 

 

 

Feb-22

 

1

1

 

Mar-22

 

 

 

 

Apr-22

 

 

 

 

May-22

 

 

 

1

 

 

 

 

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @stokidez ,

 

Try to rename your columns in Power Query Editor, then select Project column and right-click to select opyion "Unpivot Other Columns".

 

image.png

 

Your date will be displayed as shown in the image blow, then create a visual.

 

image.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @stokidez ,

 

Try to rename your columns in Power Query Editor, then select Project column and right-click to select opyion "Unpivot Other Columns".

 

image.png

 

Your date will be displayed as shown in the image blow, then create a visual.

 

image.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

Thanks @v-kkf-msft for the detailed and clear explanation! 

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.