cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
marcosim Occasional Visitor
Occasional Visitor

Cumulative total for pareto

Hi everyone!

 

I've read a lot of posts on this topic but I am still missing something.

I have created a very simple table called 'Data':

 

ProductTotal Sales
BA1000
CWA10000
DIN8000
ENC2000

 

Then the following calculated colums:

 
Rank = RANKX(Data;Data[Total Sales])

 

Cumulated = CALCULATE

(
SUM(Data[Total Sales]);
FILTER(ALL(Data[Rank]);Data[Rank] <= MAX(Data[Rank]))
)

 

However the result in Cumulated is the exact same values I have in Total Sales.

What am I missing?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Cumulative total for pareto

Hi @marcosim ,

 

If you are making a calculated column for the cumulative you should redo your formula to:

 

Cumulated = CALCULATE

(
SUM(Data[Total Sales]);
FILTER(ALL(Data);Data[Rank] <= EARLIER(Data[Rank]))
)

 

 


Regards

Miguel Felix


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

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
Super User I
Super User I

Re: Cumulative total for pareto

@marcosim 

 

You should use ALL(TABLE) instead of just the column.

 

 

Measure = CALCULATE(SUM('Table'[Total Sales]),FILTER(ALL('Table'),'Table'[Rank]<=MAX('Table'[Rank])))

 

image.png

Read about "Context transition" in Calculate.

 

If it helps, mark it as a solution

Kudos are nice too.

Super User III
Super User III

Re: Cumulative total for pareto

Hi @marcosim ,

 

If you are making a calculated column for the cumulative you should redo your formula to:

 

Cumulated = CALCULATE

(
SUM(Data[Total Sales]);
FILTER(ALL(Data);Data[Rank] <= EARLIER(Data[Rank]))
)

 

 


Regards

Miguel Felix


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

Proud to be a Datanaut!




View solution in original post

Super User IV
Super User IV

Re: Cumulative total for pareto

Refer

https://community.powerbi.com/t5/Desktop/Running-Total-on-a-non-date-column/td-p/44470

https://community.powerbi.com/t5/Desktop/Cumulative-sum-without-date-field/td-p/102967

 

Also try if this can work

Cumulated = CALCULATE
(
SUM(Data[Total Sales]);
FILTER(ALL(Data[product]);Data[product] <= earlier(Data[product]))
)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin





Did I answer your question? Mark my post as a solution!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors