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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Jan_Trummel
Helper III
Helper III

Running total for products (only with measure)

Hello community,

 

I'm trying to build a running total-measure for products, but I can't find a solution. Here is my data:

 

Products
Apple
Apple
Apple
Pear
Pear
Orange

 

I want to count the products in the table and then build a running total. This should be the result:

 

ProductsQuantityRunning total
Apple33
Pear55
Orange16

 

In MS Excel this is quite easy to realize, but in Power BI I can not find a way.

 

I already looked around in the forum and I found some good ideas with calcuated columns, RANKX and EARLIER, but I just want to do it with measures.

 

Does anyone has an idea?

 

Greeting

Jan

1 ACCEPTED SOLUTION
ALLUREAN
Solution Sage
Solution Sage

Hi, @Jan_Trummel 

 

Please check this example:

https://www.dropbox.com/s/qt6ukb50ts59v0e/Running%20total%20for%20products%28allure-analytics.com%29...

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/

 




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Jan_Trummel
Helper III
Helper III

Thanks ALLUREAN,

 

that was it! You helped me very much!

Jan_Trummel
Helper III
Helper III

Hello ALLUREAN,

 

first of all I want to thank you for your effort! Unfortunately your solution will not work in my case.

 

For example, if the number of pears in the Fact-table increases, the sorting is no longer right:

Jan_Trummel_0-1641809191563.png

 

The matrix should always be sorted (descanding) by Quantity and the RunningTotal should start with the product which has the highest number.

 

As you can see, this don't work any longer now.

 

Do you have an idea for this problem, too?

 

Greetings 

Jan

Hi, @Jan_Trummel 

 

Can you download the file again. I think that this is what you want to achieve.

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




ALLUREAN
Solution Sage
Solution Sage

Hi, @Jan_Trummel 

 

Please check this example:

https://www.dropbox.com/s/qt6ukb50ts59v0e/Running%20total%20for%20products%28allure-analytics.com%29...

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/

 




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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