Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sabinocivita
Frequent Visitor

Running total help

Hi everyone, I have these data for this year. First column 'Mese' is month and second one 'Dossier' is a distinct count coming from the data set. 'Mese' is month hierarchy from field DATASTAT of table DUNDASSTAT. 

 

sabinocivita_0-1653888893083.png

 

I filtered for 2022 year and I create this measure

 

RTDossier1 = CALCULATE(DISTINCTCOUNT(DUNDASSTAT[DOSSIER]);FILTER(ALL(DUNDASSTAT[DATASTAT].[Mese]);DUNDASSTAT[DATASTAT].[Mese] <=MAX(DUNDASSTAT[DATASTAT].[Mese])))
 
But it doesn't work. It gives me same data, not running total month after month. What is wrong?
 
Thanks for your help.
 
PS: I made measure for yearly running total and it works (taking last for years). Here below the measure
RTDossierA = CALCULATE(DISTINCTCOUNT(DUNDASSTAT[DOSSIER]);FILTER(ALL(DUNDASSTAT[DATASTAT].[Anno]);DUNDASSTAT[DATASTAT].[Anno] <=MAX(DUNDASSTAT[DATASTAT].[Anno])))
 
sabinocivita_1-1653889113837.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@sabinocivita , if you have the date, best it to have a date table have a measure like

 

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

 

if data is at month level prefer YYYYMM format month or sortable month in a separate table

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(month),month[month ] <=max(month[month])))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak sorry, but it's not clear. I'll explain better. I have a source table DUNDASSTAT. Then a date field called DATASTAT. I have a field DOSSIER. So maybe I have first to convert month name in a numeric month? 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.