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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Niiru1
Helper V
Helper V

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:

Pareto.PNG

 

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:

 

Pareto1.PNG

 

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

 

 

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

 

2 ACCEPTED SOLUTIONS
mahoneypat
Employee
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
    )

 

 

mahoneypat_0-1605224847812.png

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

@Niiru1 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)

wdx223_Daniel_0-1605226564303.png

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@Niiru1  Hey Mate ,As per 80-20 Capture.JPGlogic .You have show % of total for Pareto .

mahoneypat
Employee
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
    )

 

 

mahoneypat_0-1605224847812.png

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


camargos88
Community Champion
Community Champion

@Niiru1 ,

 

You can use your event date column without hierarchy:

 Capture.PNG

 

Check the attached file.



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

Proud to be a Super User!



Pareto2.PNG

 

I was hoping to get something like this

@Niiru1 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)

wdx223_Daniel_0-1605226564303.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors