cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User

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] )
    )
)

View solution in original post

2 REPLIES 2
Super User
Super User

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] )
    )
)

View solution in original post

Super User
Super User

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
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 6 members 3,618 guests
Please welcome our newest community members: