cancel
Showing results for
Did you mean:
New Member

## How to count month wise from a list of data contains dates?

Hi

I have the following set of data queried in power query.

 Date of complaint Customer name Complaint detail Resolution status 1/17/20 a aa Yes 1/18/20 b bb No 2/10/20 c cc No 2/15/20 d dd No 2/18/20 e ee Yes 3/16/20 f ff Yes 4/13/20 g gg Yes 4/17/20 h hh No 4/21/20 i ii Yes 4/31/20 j jj No 12/5/20 k kk Yes 12/7/20 l ll No

I need to show in a line graph - x axis : month names in format Jan20, Feb20, Mar20...Dec20

y axis : number of complaints in each month added cumulatively

Output in line graph based on the above table should be like

Jan20 : 2

Feb20 : 2 + 3 = 5

Mar20 : 5 + 1 = 6

Apr20 : 6+4 = 10

May 20 : 10 + 0 = 10

Jun20 : 10 + 0 = 10

upto

Dec20 : 10 + 2 =12

1 ACCEPTED SOLUTION
Community Champion

Hi, @manicktvs91

Please check the below picture and the sample pbix file's link down below.

Complaints count cumulate =
CALCULATE (
SUMX ( VALUES ( Dates[Month & Year] ), CALCULATE ( COUNTROWS ( Complaint ) ) ),
FILTER ( ALL ( Dates ), Dates[Date] <= MAX ( Dates[Date] ) )
)

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

2 REPLIES 2
Community Champion

Hi, @manicktvs91

Please check the below picture and the sample pbix file's link down below.

Complaints count cumulate =
CALCULATE (
SUMX ( VALUES ( Dates[Month & Year] ), CALCULATE ( COUNTROWS ( Complaint ) ) ),
FILTER ( ALL ( Dates ), Dates[Date] <= MAX ( Dates[Date] ) )
)

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

New Member

This is fantastic! You are genius and awesome. I have some more queries and I will post here @Jihwan_Kim

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

#### Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors