Forum Discussion
ON date finding Cummulative Number...
Is there way to calculate cummulative number of occurences based on the date coulmn.
For example:
In one table i have the information when something was created:
date | name
1/1/2025 | abc
12/1/2025 | osks
13/3/2025 | doferf
and in the second one i want to have a number of "names" by month name (lets assume i have a Date table with month names related with the first table). So if to names were created in january the sum i 2, if no names were created in february total number is still 2, one was created in march so total number now is 3, and so on....
Month name | Number of names
January | 2
February | 2
March | 3
Is there a wasy to do this?
Thanks!
Hi Suman8877
You can do this with a cumulative (running total) measure in DAX. Here’s one simple way:
1. Make sure you have a proper Date table in your model and relate it to your fact table [Date].
2. Create a base count measure:
Rows Count = COUNTROWS ( Events )3. Then create the cumulative measure:
Cumulative Names = CALCULATE ( [Rows Count], DATESYTD ( 'Date'[Date] ) )4. Put Year and Month Name from your Date table on rows, and use Cumulative Names as the value.
Updated, sorry I forgot the YTD part
https://drive.google.com/drive/folders/1DmxrAG-Ow0X5XuCWUq3f8fGATFqblxfs?usp=sharing
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
4 Replies
- rohit1991Super User
Hi Suman8877
You can do this with a cumulative (running total) measure in DAX. Here’s one simple way:
1. Make sure you have a proper Date table in your model and relate it to your fact table [Date].
2. Create a base count measure:
Rows Count = COUNTROWS ( Events )3. Then create the cumulative measure:
Cumulative Names = CALCULATE ( [Rows Count], DATESYTD ( 'Date'[Date] ) )4. Put Year and Month Name from your Date table on rows, and use Cumulative Names as the value.
- FBergamaschiSuper User
this is very simple,
here is my file for you:
https://drive.google.com/drive/folders/1DmxrAG-Ow0X5XuCWUq3f8fGATFqblxfs?usp=sharing
here is the result based on the below data I invented
If this helped, please consider giving kudos and mark as a solution
mein replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- Suman8877Advocate II
Hi FBergamaschi
The solution posted just shows count of names per month (Jan = 2, Mar = 3, Apr = 1, etc.). That’s only a monthly count, not cumulative.
- FBergamaschiSuper User
Updated, sorry I forgot the YTD part
https://drive.google.com/drive/folders/1DmxrAG-Ow0X5XuCWUq3f8fGATFqblxfs?usp=sharing
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI