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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Count per month

Hi to the big community,

 

I am strugling with the below case:

I need a column chart per month which present the count of the rows which Month of Date_b is greater than Month of Date A until the month of Date_B. To be more clear if my data was the row in the table the result would be the below:

 

Jan=0

Feb=0

Mar= 1 (in id=2 Month(date_B)-Month(date)=3)

Apr=1 (in id=2 Month(date_B)-Next Month (Date_A)=2)

May=1 (in id=2 Month(date_B)-Next Next Month (Date_A)=1)

June=0 (in id=2 Month(date_B)-Next Next NextMonth (Date_A)=0)

Jule =0 (in id=2 Month(date_B)-Next Next Next Next Month (Date_A)=-1)

.

.

Dec=0 (in id=2 Month(date_B)-Next Next Month (Date_A)=-8)

 


Sample Data:

Id

Date_ADate_B

2

11/3/202125/6/2021
   
2 REPLIES 2
lbendlin
Super User
Super User

Neither the explanation nor the sample data is sufficient.  Please restate the issue and provide some more sample data .

Anonymous
Not applicable

Hi and thanks for the reply.

 

My goal is to have a countrow of the table for each month depending the pending orders. So, Date_A is a Order Date and the Date_B the Shipping Date. So in Jan(31/01) we have no pending orders. Same in Feb(28/2). In the March we have 1. In the April 1, in May 1, in June 0...
I am trying to build a column chart with x axis all the months and  values how many pending orders in each month.

 

Thanks in advanced.  
 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.