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
mgastalho
New Member

Cumulative items

Hi, 

I need to do a histogram with 3 values:

Axis X = Leadtime

Axis Y = Number of itens with the leadtime showed

Axis Y(2) = Percentage of itens on leadtime

I count how many items are in leadtime 1, 2, 3, 4..... 

But now i need to trace a line with percent to know how many items i delivery with 80% sure in leadtime.

To do this count i have to do something like this:

 

DaysItemsCumulative%
12225%
23563%
32788%
418100%

 

Cumulative/ SUM(Items) = %

I don´t know how to do this cumulative. 

I´ve done this: 

imagem1.PNG

Where Axis X is Leadtime and Axis y is total of items

 

I need to do this: 

cumulative.PNG

 

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @mgastalho ,

 

Based on your sample data, we can create two measures to meet your requirement.

 

Cumulative = 
CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))

 

% = 
var _cum = CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))
var _Total = CALCULATE(SUM('Table'[Items]),ALLSELECTED('Table'))
return
DIVIDE(_cum,_Total)

 

CUM1.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

View solution in original post

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @mgastalho ,

 

Based on your sample data, we can create two measures to meet your requirement.

 

Cumulative = 
CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))

 

% = 
var _cum = CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))
var _Total = CALCULATE(SUM('Table'[Items]),ALLSELECTED('Table'))
return
DIVIDE(_cum,_Total)

 

CUM1.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

ryan_mayu
Super User
Super User

@mgastalho 

based on your sample data, you need to create two columns.

cumulative1 = SUMX(FILTER(Sheet1,Sheet1[Days]<=EARLIER(Sheet1[Days])),Sheet1[Items])

%1 = Sheet1[cumulative1]/sum(Sheet1[Items])

1.PNG

I am not sure if this also works for your real data. please let me know if you have any questions.

 





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

Proud to be a Super User!




pranit828
Community Champion
Community Champion

Hi @mgastalho 

 

What you are looking for is pareto chart, once pareto chart is done you will need to conditionally format the color of the days bar to a different color when it is more than equal to 80%.

Check this link, it explain to do the same.

https://www.youtube.com/watch?v=FPckiBv657c

 

I think you have almost got it, might just be missing just few details.

 

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

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.