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

Date count in the month

Wish to count the number of starts in the month of the start date.. 

eg

ID  Start Date 

1 12/2/22

2 1/2/22

4 6/4/22

6 18/2/22

 

Required answer:

Starts:

Feb 22 - 3

Mar 22 - 0

Apr -1

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @spb ,

Assuming you have your table loaded in power query like below:

Step 1:

Dax_Noob_0-1663048637957.png

Step 2:  Add a new calculated column in the same table, your table should now look like the screenshot below:

Month & Day = FORMAT(Sheet1[Start Date],"MMM")& " " & YEAR(Sheet1[Start Date])

Dax_Noob_1-1663048692678.png


Step 3: Create a new calculated table:

Table Count = 
ADDCOLUMNS(
SUMMARIZE(Sheet1,Sheet1[Month & Day]),"Frequency",COUNT(Sheet1[Month & Day]))

 
Step 4 : Final Output

Table Count = 
ADDCOLUMNS(
SUMMARIZE(Sheet1,Sheet1[Month & Day]),"Frequency",COUNT(Sheet1[Month & Day]))


Hope that helps!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @spb ,

Assuming you have your table loaded in power query like below:

Step 1:

Dax_Noob_0-1663048637957.png

Step 2:  Add a new calculated column in the same table, your table should now look like the screenshot below:

Month & Day = FORMAT(Sheet1[Start Date],"MMM")& " " & YEAR(Sheet1[Start Date])

Dax_Noob_1-1663048692678.png


Step 3: Create a new calculated table:

Table Count = 
ADDCOLUMNS(
SUMMARIZE(Sheet1,Sheet1[Month & Day]),"Frequency",COUNT(Sheet1[Month & Day]))

 
Step 4 : Final Output

Table Count = 
ADDCOLUMNS(
SUMMARIZE(Sheet1,Sheet1[Month & Day]),"Frequency",COUNT(Sheet1[Month & Day]))


Hope that helps!

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.