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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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.

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
Super User

@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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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