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
Anonymous
Not applicable

Cumulative Total for a Summarize Table

Hello Experts,

 

Need help in getting running/Cumulative total. I have a summarized table and for that i need one more column that helps in getting cumulative total please help

 

 

	SUMMARIZE (
			FILTER ( Inv_Fact_Inventory, 
						Inv_Fact_Inventory[Dashboard]="Current Inventory" && Inv_Fact_Inventory[Inventory Status]="ASSIGNED" && Inv_Fact_Inventory[Inventory Order Type]="TENDERED NOT SHIPPED" ),
			Inv_Fact_Inventory[Received Date],
			"UnAssignedTenderCount", DISTINCTCOUNT(Inv_Fact_Inventory[CURINV_CARGO_ID])
		 )

 

 

Here is the output

 

sarthaks_0-1594631092575.png

And in that i need one more column that will have running total. Please help

 

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

 

Do you try the way that @az38 suggested? It should work fine. You also could reference the blog to have a try.

https://www.sqlbi.com/articles/computing-running-totals-in-dax/

 

If you still need help, please share some sample data and your expected output. We will understand more clearly.

 

Best Regards,
Xue Ding
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

@Anonymous , We typically get cumulative like this

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=max(Sales[Sales Date])))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184


Appreciate your Kudos.

az38
Community Champion
Community Champion

Hi @Anonymous 

try smth like

Measure =
var _curDate = MAX(Table[Date])
RETURN
CALCULATE(
SUM(Table[Results]),
FILTER(ALL(Table), Table[Date] <= _curDate )
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.