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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
DidacBF
Frequent Visitor

Missing values in cumulative count when filtering by month

Hi, I made this basic measure to cumulative SUM a value over the months:

PHs PLV Colocado Acumulado =

CALCULATE (
    DISTINCTCOUNTNOBLANK(PDV[ID pdv]),
    'Respuestas - PLV'[Colocado]=1,
    FILTER (
        ALL ( Calendario[Fecha visita] ),
        Calendario[Fecha visita] <= MAX ( ( Calendario[Fecha visita] ) )
    )
)
It is working when I use it on a matrix with months:
DidacBF_0-1665167285691.png


But when I filter by month, both items with no data that month disappear:

DidacBF_1-1665167355791.png


I think I'm missing something obvious but I can't make it work...

Thank you!!!

1 ACCEPTED SOLUTION
DidacBF
Frequent Visitor

Hello @Greg_Deckler !

Thank you for the reply but I might not explained myself.

With your solution it shows the categories but with a 0 as value, what i was expecting is the running total value even when the month has no data for that category:

DidacBF_0-1665326034673.png


This is what I want when I filter by month:

DidacBF_1-1665326135361.png


Thank you!!



I ended up making it work by creating a calculated table with summarizecolumns (month and category) and +0 for months with no data, and then a measure over it with MAX since the value will never decrease.
Not 100% happy because I'm pretty sure it's a better way of doing this but at least I got it working.

Thank you!!

View solution in original post

2 REPLIES 2
DidacBF
Frequent Visitor

Hello @Greg_Deckler !

Thank you for the reply but I might not explained myself.

With your solution it shows the categories but with a 0 as value, what i was expecting is the running total value even when the month has no data for that category:

DidacBF_0-1665326034673.png


This is what I want when I filter by month:

DidacBF_1-1665326135361.png


Thank you!!



I ended up making it work by creating a calculated table with summarizecolumns (month and category) and +0 for months with no data, and then a measure over it with MAX since the value will never decrease.
Not 100% happy because I'm pretty sure it's a better way of doing this but at least I got it working.

Thank you!!

Greg_Deckler
Community Champion
Community Champion

@DidacBF Try:

CALCULATE (
    DISTINCTCOUNTNOBLANK(PDV[ID pdv]),
    'Respuestas - PLV'[Colocado]=1,
    FILTER (
        ALL ( Calendario[Fecha visita] ),
        Calendario[Fecha visita] <= MAX ( ( Calendario[Fecha visita] ) )
    )
) + 0


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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.

Top Solution Authors