Forum Discussion
Cumulative Sum on Text Field
Hi,
I am trying to present a cumulative sum by priority and project with the two being a concatenated field in a separate table.
Example. (Priority Initiative)
1-Warehouse
2-Field
3-Retail
11-Other
Sales Data
Priority 1 50
Priority 11 -200
I am trying to capture the sales and other data such that I can sort the matrix by the priority intiative and have it calculate correctly.
Thanks for your help.
Anonymous
Please check the attached file:Running Total = CALCULATE( [Total Sales], 'Sales Table'[Priortiy] <= MAX( 'Priority Table'[Priority] ), ALLSELECTED( 'Priority Table' ) )
9 Replies
- saudansariHelper II
So do your columns have numbers only or both numbers and text If yes, I recommend using a split column in Power Query and the sum with DAX. If this is not helping I will recommend creating a sample data and sharing the file with us to remove sensitive data
- AnonymousNot applicable
Hi, here is how things look.... Thanks!
Sales Table Priortiy Sales Team 1 50 A 11 200 A 3 75 B 2 50 B Priority Table Priority Priority Int 1 1-Warehouse 2 2-Field 3 3-Retail 11 11-Other Desired Team A Sales Team A Cumulative Team B Team B Cumulative 1-Warehouse 50 50 2-Field 50 50 50 3-Retail 50 75 125 11-Other 200 250 Total 250 250 125 125 - saudansariHelper II
Try This hope this help
https://drive.google.com/file/d/1k1M3yCb-4z1e_mF0hAT28SpeY3vdrX2P/view?usp=drivesdk
please make sure there is a relationship between the 'Priority' field in the 'Priority Table' and the 'Priority' field in the 'Sales Table'.
- FowmySuper User
Anonymous
Modify your measure as follows. I assume you have includedonly the 'Priority Intiative'[Priority Int] on the Row section of the matrix, that's way I removed the filters using REMOVEFILTER, if you have added more columns from the same table, please include them as well.Running Total = CALCULATE( sum( Sales[Total Sales]), 'Priority Intiative'[Priority] <= MAX('Priority Intiative'[Priority]), REMOVEFILTERS( 'Priority Intiative'[Priority Int] ) )- AnonymousNot applicable
Thanks! I am still runnning into this thing where it doesn't carry the value down. My Priority table only has the Int field and the priority number. Any thoughts?
- FowmySuper User
Anonymous
Try this measure, if it doesn't work, please share a dummy PBI file that represents your secenario. Save it in Google Drive and share the link here.Running Total = CALCULATE( sum( Sales[Total Sales]), 'Priority Intiative'[Priority] <= MAX('Priority Intiative'[Priority]), REMOVEFILTERS( 'Priority Intiative') )