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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Jonaae
Frequent Visitor

cummulative not completing correctly per month

Hello friends,

can you guys please help me understanding why my measure is not completing correctly per month, the cumulative way is doing correctly, the problem is that is not replicating the value from the previous month when there's not a record in that month.

 

conteo = 
CALCULATE(
	COUNTA('data'[Nombre certificación]),
    'data'[Nombre certificación] IN {
        "Databricks Certified Associate Developer for Apache Spark 3.0",
		"Databricks Certified Data Engineer Associate",
		"Databricks Certified Data Analyst Associate"
    },
	FILTER(
		CALCULATETABLE(
			SUMMARIZE(
				'data',
                data[Nombre certificación]
			)
		),
		ISONORAFTER(
            'data'[Nombre certificación], 'data'[Nombre certificación], ASC
		)
		),
    ALL ( 'data' ),
    data[Fecha] <= MAX ( 'data'[Fecha] )
)

 

The one that gives me the following result:

Jonaae_0-1673165140199.png

but my expected result should be:

Jonaae_1-1673165212813.png

I don't have that much experiencie working with DAX calculation and I don't have that clear what my problem couldbe.

any recommendation please.

1 ACCEPTED SOLUTION

hi @Jonaae 

For the months with no data, it supposed to return BLANK.

If you insist, try to

1) create a date table like this:

DateTable = CALENDAR(MIN(data[Date]), MAX(data[Date]))
2) relate the two tables.

3) plot the Matrix Visual with the DateTable[Date] and a measure like this:

 

RunningTotal = 
VAR _date = MAX(DateTable[Date])
RETURN
CALCULATE(
    SUM(data[qty]),
    FILTER(
        ALL(DateTable[Date]),
        DateTable[date]<=_date
    )
)

 

 

it shall work like this:

FreemanZ_5-1673185840507.png

sample dataset:

FreemanZ_6-1673185870576.pngFreemanZ_7-1673185900053.png

 

 

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi  @Jonaae

what do you get if you try like:

conteo =
CALCULATE(
        COUNTA('data'[Nombre certificación]),
    'data'[Nombre certificación] IN {
        "Databricks Certified Associate Developer for Apache Spark 3.0",
                "Databricks Certified Data Engineer Associate",
                "Databricks Certified Data Analyst Associate"
    },
    data[Fecha] <= MAX ( 'data'[Fecha] )
)

 

Hello @FreemanZ thanks for your answer.

This is what I get with your recommendation:

Jonaae_0-1673171323728.png

It's not getting them acumulatevely per year and  month ( Jan-23) and still not considering the months where there are no records.

hi @Jonaae 

For the months with no data, it supposed to return BLANK.

If you insist, try to

1) create a date table like this:

DateTable = CALENDAR(MIN(data[Date]), MAX(data[Date]))
2) relate the two tables.

3) plot the Matrix Visual with the DateTable[Date] and a measure like this:

 

RunningTotal = 
VAR _date = MAX(DateTable[Date])
RETURN
CALCULATE(
    SUM(data[qty]),
    FILTER(
        ALL(DateTable[Date]),
        DateTable[date]<=_date
    )
)

 

 

it shall work like this:

FreemanZ_5-1673185840507.png

sample dataset:

FreemanZ_6-1673185870576.pngFreemanZ_7-1673185900053.png

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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