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

Cumulative Value

Hi There

 

I have this table:

FunctionDateStatusCount
A6/1/2021DONE3
A6/9/2021NOT DONE2
A6/23/2021DONE1
A8/11/2021DONE7
B6/11/2021DONE7
B7/22/2021NOT DONE6

 

How can I get a cumulative value column for each function based on month and for status = all and status = DONE, like this:

FunctionDateStatusCountcumulative value allcumulative value DONE
A6/1/2021DONE333
A6/9/2021NOT DONE25 
A6/23/2021DONE164
A8/11/2021DONE71311
B6/11/2021DONE777
B7/22/2021NOT DONE613 

 

What I am trying to get is a graph line chart for function A showing the cumulative value all and cumulative value DONE  for June, and August and another graph same thing for function B.

 

Thank you very much

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formulas

Cumulative count = CALCULATE(SUM(Data[Count]),FILTER(Data,Data[Function]=EARLIER(Data[Function])&&Data[Date]<=EARLIER(Data[Date])))

Cumulative count - Done = if(Data[Status]="Not Done",BLANK(),CALCULATE(SUM(Data[Count]),FILTER(Data,Data[Function]=EARLIER(Data[Function])&&Data[Status]="Done"&&Data[Date]<=EARLIER(Data[Date]))))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

The cumulative Done worked , but the Cumulative all is coming up with weird number not sure if they're true.

function DatestatusCount Cumulative allCumulative doneDate
A4/1/2021done3 332021-04-01 0:00
A5/1/2021done2 552021-05-01 0:00
A6/1/2021done5 39102021-06-01 0:00
A6/1/2021not done1 46172021-07-01 0:00
A6/1/2021not done2 28222021-08-01 0:00
A7/1/2021done7 64252021-09-01 0:00
A7/1/2021not done3 126292021-10-01 0:00
A8/1/2021done5 144332021-11-01 0:00
A9/1/2021not done1 106352021-12-01 0:00
A9/1/2021done3 57 2022-01-01 0:00
A10/1/2021not done5 124 2022-02-01 0:00
A10/1/2021done4 73 2022-03-01 0:00
A10/1/2021not done1 74 2022-04-01 0:00
A11/1/2021not done1    
A11/1/2021done4    
A11/1/2021not done1    
A12/1/2021not done3    
A12/1/2021done2    
A1/1/2022not done4    
A2/1/2022not done4    
A2/1/2022not done1    
A3/1/2022not done11    
A4/1/2022not done1    
        
        

Hi @tony_tohme ,

I suspect the error is because @Ashish_Mathur 's formula is "Not Done", but your data is "not done", you should modify this in your formula.

Cumulative count - Done = if(Data[Status]="Not Done",BLANK(),CALCULATE(SUM(Data[Count]),FILTER(Data,Data[Function]=EARLIER(Data[Function])&&Data[Status]="Done"&&Data[Date]<=EARLIER(Data[Date]))))

Best Regards,
Community Support Team _ kalyj

 

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

Hi,

As you can see in my screenshot, my formulas are working fine.  I am not sure of what you are doing.  Share the link from where i can download your PBI file with the formula already written there. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1643585826705.png

 

Worksheet formula is enough

CNENFRNL_1-1643585933535.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thank you, I tried your version and I got the same result as my reply above for the cumulative all, not sure if this is the expected result...

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.