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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MH3
Helper V
Helper V

Commulative Total Not Working or Broken

Hello,

I have a Measure for Revenue, and I was trying to calculate the Commulative Total, but it's not displaying correct values.

as the formula for the Commulative total I used is:

Cummulative = 
CALCULATE(
	Sales[Revenue],
	FILTER(
		ALLSELECTED('Calendar'),
	'Calendar'[Date] <= Max('Calendar'[Date])))
	


See the Screen Shot
Revenue and Commulative.PNG

 

For the year 2014, Month January 

Day 1: Revenue is 3,300 , Commulative is 3,300 which is correct!

Day 2: Revenue is 694,200, Commulative is 793,800 which is WRONG!!

 

The whole commulative is showing incorrect values.

Kindly help!!

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

Hi @MH3 ,

 

We can use the following measure to meet your requirement.

 

Cummulative = 
CALCULATE(
            SUMX(VALUES('Calendar'[Date]),'Sales'[Measure revenue]),
            FILTER(
                        ALLSELECTED('Calendar'),
            'Calendar'[Date] <= Max('Calendar'[Date])))

 

Then result like this,

 

commulative 1.jpg

 

 

BTW, pbix as attached.

 

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.

amitchandak
Super User
Super User

@MH3 , I am assuming this a measure like this

Cummulative =
CALCULATE(
sum(Sales[Revenue]),
FILTER(
ALLSELECTED('Calendar'),
'Calendar'[Date] <= Max('Calendar'[Date])))

 

Also make sure year, month or any other time related stuff is taken from Calendar in visual

Hello @amitchandak ,

 

Sales[Revenue] is already a measure does it needs to be in SUM function? and I have used this formula but still I am not getting correct results.

 

Help!

Helpful resources

Announcements
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.