Forum Discussion

arimoldi's avatar
arimoldi
Icon for Resolver II rankResolver II
2 years ago
Solved

Sum of Count Measure

Hi,

 

how can I create a measure that calculates the sum of the count of a column?

 

I want to create a graph that shows over the time (x axis) not the count of a column (y-axis) but the sum of the counted values, so that the line graph should be incremental over time.

 

Any suggestion?

 

Thanks,

Andrea

 

  • Hi arimoldi 

     

    Based on what I am understanding, you want to the cumulative count over time?

    If so, you can create a cumulative count measure like the below:

     

    Cumulative Count = 
    
    CALCULATE (
        COUNT ( 'Table'[ColumnName] ) , // Change Table and Column Name to your table and column name
        FILTER (
            ALL ( 'Table'[DateColumn] ) , // Change Table and Date Name to your table and DateColumn name both here and below
            'Table'[DateColumn] <= MAX ( 'Table'[DateColumn] )
        )
    )

     

    Let me know how this goes!

     

    Theo 🙂

     

1 Reply

  • TheoC's avatar
    TheoC
    Icon for Community Champion rankCommunity Champion

    Hi arimoldi 

     

    Based on what I am understanding, you want to the cumulative count over time?

    If so, you can create a cumulative count measure like the below:

     

    Cumulative Count = 
    
    CALCULATE (
        COUNT ( 'Table'[ColumnName] ) , // Change Table and Column Name to your table and column name
        FILTER (
            ALL ( 'Table'[DateColumn] ) , // Change Table and Date Name to your table and DateColumn name both here and below
            'Table'[DateColumn] <= MAX ( 'Table'[DateColumn] )
        )
    )

     

    Let me know how this goes!

     

    Theo 🙂