cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
manicktvs91
New Member

Visualization - Line chart with cumulative numbers!

Hi,

I have a set of data (for example : number of customer complaints on weekly basis for last 1 year), Now I want to represent it in a line chart with cumulative increasing numbers week on week. what is the method to do this?

 

Currently the line graph which I am able to do is to indicate the absolute values each week. I want to show it as cumulative increasing number each week.

 

Many thanks if anybody can help me out!

 

Manickaraj

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @manicktvs91 ,

 

You could try measure like below:

Measure = CALCULATE(SUM('Table'[complaints ]),FILTER(ALL('Table'),COUNTROWS(FILTER('Table',EARLIER('Table'[Year_week])<='Table'[Year_week]))))

V-lianl-msft_0-1623219440642.pngV-lianl-msft_1-1623219448421.png

 

 

Best Regards,
Liang
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

7 REPLIES 7
V-lianl-msft
Community Support
Community Support

Hi @manicktvs91 ,

 

You could try measure like below:

Measure = CALCULATE(SUM('Table'[complaints ]),FILTER(ALL('Table'),COUNTROWS(FILTER('Table',EARLIER('Table'[Year_week])<='Table'[Year_week]))))

V-lianl-msft_0-1623219440642.pngV-lianl-msft_1-1623219448421.png

 

 

Best Regards,
Liang
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

Hi Liang, @V-lianl-msft 

 

I used the pbix file which you shared in my post and I saw you have queried a table which contains months and counts.

 

However, I have a list of customer complaints file and how should I create the table which you queried in power query.

 

I want to create this table by some measures in powerBI itself.

 

My input table in power query is "List of customer complaints" containing columns "Date of complaint" " Customer name" "Detail of complaint" etc..

 

I need to create the count of "no. of complaints" for each month as a table and then I have to use your method to put cumulative line graph.

 

Please help.

 

Thanks

Manickaraj

@V-lianl-msft Thank you once again

Hi Liang, Thank you very much. I tried the same with another set of data and it worked. Many thanks

Greg_Deckler
Super User IV
Super User IV

@manicktvs91 There are running total quick measures but the general pattern is using something like:

Measure = 
  VAR __Date = MAX('Table'[Date])
RETURN
  SUMX(FILTER(ALL('Table'),[Date] <= __Date),[Column])

You didn't provide any detail, so hard to be specific. Here's the standard "more info" macro:

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@Greg_Deckler Thank you for the reply. I am trying your method. Is there an option to upload my pbix file here so that you can have a look?

@manicktvs91 Super users can post PBIX files but otherwise you would need to post on OneDrive/Box and share a link


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

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.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

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

R2 (Green) 768 x 460px.png

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.