Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Cumulative Frequency curve adjusted x axis

I'm currently trying to build a pareto chart from a list of dates and I've populated the following table:

Total NumberRankCumulative TotalTotal Incidents%Month/Year
254501254506327540.22Oct 2020
176022430526327568.04Apr 2020
75763506286327580.01Sep 2020
45184551466327587.15May 2020
32635584096327592.31Mar 2020
29206613296327596.92Aug 2020
7637620926327598.13Nov 2020
6998627916327599.24Jul 2020
48496327563275100Jun 2020

 

My rank is built from the month/year column:

Rank = IF(
ISBLANK('Sheet1'[Total Number]) || NOT HASONEVALUE('Sheet1'[Month/Year]), BLANK(),
RANKX(ALL('Sheet1'[Month/Year]), ([Total Number])))
 
However I keep ending up with this:

 

Where i'd like to have the same cumulative frequency line but the Dates in order as when I change it I end up with:

 

 

Is there a way to fix this pareto chart with the correct x-axis?

 

 

https://www.dropbox.com/s/c3hfci8jabydxv1/Pareto.pbix?dl=0

 

  • You can use the measure expression below for your line value, along with the Event Date on your X-axis (not the hierarchy) to get the shown pic.

     

    Cumul Events =
    VAR thisdate =
        MAX ( Sheet1[Event Date] )
    RETURN
        CALCULATE (
            [Total Number],
            ALL ( Sheet1[Event Date] ),
            Sheet1[Event Date] <= thisdate
        )

     

     

    Regards,

    Pat

  • Anonymous might this work

    Cumulative total = VAR _ym=SUMX(TOPN([Rank],ALL('Sheet1'[Month/Year]),[Total Number],DESC),[Total Number]) VAR _cd=MAX(Sheet1[Event Date]) VAR _d=CALCULATE(COUNT(Sheet1[Event ID]),Sheet1[Event Date]<=_cd) RETURN IF(ISFILTERED(Sheet1[Event Date]),_d,_ym)

     

5 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    You can use the measure expression below for your line value, along with the Event Date on your X-axis (not the hierarchy) to get the shown pic.

     

    Cumul Events =
    VAR thisdate =
        MAX ( Sheet1[Event Date] )
    RETURN
        CALCULATE (
            [Total Number],
            ALL ( Sheet1[Event Date] ),
            Sheet1[Event Date] <= thisdate
        )

     

     

    Regards,

    Pat

    • Anonymous's avatar
      Anonymous
      Not applicable

       

      I was hoping to get something like this

      • wdx223_Daniel's avatar
        wdx223_Daniel
        Icon for Community Champion rankCommunity Champion

        Anonymous might this work

        Cumulative total = VAR _ym=SUMX(TOPN([Rank],ALL('Sheet1'[Month/Year]),[Total Number],DESC),[Total Number]) VAR _cd=MAX(Sheet1[Event Date]) VAR _d=CALCULATE(COUNT(Sheet1[Event ID]),Sheet1[Event Date]<=_cd) RETURN IF(ISFILTERED(Sheet1[Event Date]),_d,_ym)

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous  Hey Mate ,As per 80-20 logic .You have show % of total for Pareto .