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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.