cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pmcard97 Occasional Visitor
Occasional Visitor

Cumulative Transaction Count

I have a table of transactions with a transaction date.  I want to create a line graph that displays the cumulative count of transactions.

 

I created a new column as:

 

 

Cumulative Count = CALCULATE(
                    COUNTROWS(master_roster),
                    FILTER( ALLSELECTED(master_roster), 
                            master_roster[enrollmentDate] <= MAX(master_roster[enrollmentDate]) )
            )

 

 

For some reason, the filter does not seem to be working.  Every data row in the table has Cumulative Count = the total number of rows. When I create a line graph with [enrollmentDate] on the Axis and Maximum of [Cumulative Count] in the values I get the total count for all dates.

 

What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Cumulative Transaction Count

@pmcard97

 

Hi,

 

If you are using a calculated column, you need to replace "Max" with "Earlier"

=
CALCULATE (
    COUNTROWS ( master_roster ),
    FILTER (
        master_roster,
        master_roster[enrollmentDate] <= EARLIER ( master_roster[enrollmentDate] )
    )
)
Try my new Power BI game Cross the River

View solution in original post

2 REPLIES 2
Super User III
Super User III

Re: Cumulative Transaction Count

@pmcard97

 

Hi,

 

If you are using a calculated column, you need to replace "Max" with "Earlier"

=
CALCULATE (
    COUNTROWS ( master_roster ),
    FILTER (
        master_roster,
        master_roster[enrollmentDate] <= EARLIER ( master_roster[enrollmentDate] )
    )
)
Try my new Power BI game Cross the River

View solution in original post

Super User IV
Super User IV

Re: Cumulative Transaction Count

Hi @pmcard97,

 

Show your dataset and the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors