Forum Discussion

manicktvs91's avatar
manicktvs91
New Member
5 years ago
Solved

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

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    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.

    • manicktvs91's avatar
      manicktvs91
      New Member

      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?

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

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

    • manicktvs91's avatar
      manicktvs91
      New Member

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

    • manicktvs91's avatar
      manicktvs91
      New Member

      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