Forum Discussion
cumulative suite through time
Hi everybody,
Underneath I have a suite of quantities each month, I mean => 4,3,2,1 etc.. .
I would like to get the cumulative suite of theses quantities, I mean => 4, 7, 9, 10 etc..
How can I do that?
Thank you for your help.
Hi,
One of ways to achieve this is to use visual calculation.
I tried to create a sample pbix file like below, and please check the below image and the attached pbix file.
Hi PatrickByGecko ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.
8 Replies
- Mauro89Super User
Hi PatrickByGecko,
You can create a cumulative total using a DAX measure. Here's a option you can try out:
Cumulative Quantity = CALCULATE( SUM('YourTable'[Quantity]), FILTER( ALLSELECTED('YourTable'[Date]), 'YourTable'[Date] <= MAX('YourTable'[Date]) ) )If you're using a Date table (recommended):
Cumulative Quantity = CALCULATE( SUM('YourTable'[Quantity]), FILTER( ALLSELECTED('DateTable'[Date]), 'DateTable'[Date] <= MAX('DateTable'[Date]) ) )Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution
- Jihwan_KimSuper User
Hi,
One of ways to achieve this is to use visual calculation.
I tried to create a sample pbix file like below, and please check the below image and the attached pbix file.
- ZanquetaSuper UserTo achieve a cumulative sequence like 4 → 7 → 9 → 10 from monthly quantities, you do not need TOTALYTD unless you are working with a date hierarchy and want Year-To-Date totals. For a simple cumulative sum across monthsIf your Date table has a proper Date column:
CumulativeQty_YTD = TOTALYTD( SUM('YourTable'[Quantity]), 'Date'[Date] )Official Reference:If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
- cengizhanarslanSuper User
Hi, if you want to have cumulative over time in total try below:
Cumulative Quantity = VAR CurrentDate = MAX ( 'Calendar'[Date] ) RETURN CALCULATE ( [Quantity], FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= CurrentDate ) )If you want it to be reset each year then below:
Cumulative Quantity YTD = TOTALYTD( [Quantity], 'Calendar'[Date] ) - Ashish_MathurSuper User
Hi,
If you want the accumulation to start from January, then try this measure
Measure = calculate([Total],datesytd(calendar[Date]))
Hope this helps.
- v-venuppuCommunity Support
Hi PatrickByGecko ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you Ashish_Mathur cengizhanarslan Zanqueta Jihwan_Kim Mauro89 for the prompt response.
I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.
Thank you.
- v-venuppuCommunity Support
Hi PatrickByGecko ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.
- PatrickByGeckoHelper V
Hi, thank you to you all for your help, and sorry for this delay of answer but I went a big sick...