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
JdBernate
Frequent Visitor

Help to fix measure to cumulative sales

Hi guys

 

I did a measure to calculate the cumulative sales in every store, but  i used to believe that it was working but checking i´d realized that it isnt. I cant find where is the trouble.
If you look the picture, you can see that the cumulative sales repeat values for the first stores, i would like to only show the real cumulative sales

 

pic.jpg

 

 

 

 

 

 

 

 

 

 

 

 

This is my measure:

CumSales = calculate([Sales],FILTER(ALLSELECTED(Stores[Description),sum(GeneralSheet[TotalSoldAmount])<=[Sales]))

 

Hope you can help me

 

Regards

 

Juan Diego

2 REPLIES 2
v-danhe-msft
Employee
Employee

Hi @JdBernate,

Based on my test, you can refer to below steps:

1.I have entered some sample data like the picture below:

A.PNG

2.Create a measure.

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

3.Create a Table visual and add the related field. Now you can see the result.

B.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/yt7mc01x7d5schn/Help%20to%20fix%20measure%20to%20cumulative%20sales.pbix?d...

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-danhe-msft

 

Thank you for your answer. Maybe i should have been more specific in the description. The rank is also a measure, because the sales and the position of the stores change through time, so, the rank that you created in the original table could be by every month? Because thats what iam looking for, cumulatives sales variable.

 

Again thank you.

 

Regards

 

 

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.