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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
FabvE
Helper I
Helper I

Running rowcount with filter by date

Hi,

I tried various hints from this forum but found no solution for my problem.

My data is like this:

  • table name: Activity
  • column Operation: different values like "FileUploaded", "FileDownloaded", "FileAccessed"
  • column Date created: datetime when the operation was fullfilled
Date CreatedOperation
01.11.2024FileUploaded
01.11.2024FileDownloaded
02.11.2024FIleDownloaded
02.11.2024FileUploaded
02.11.2024FileUploaded
02.11.2024FileUploaded
03.11.2024FileDownloaded
03.11.2024FileUploaded
04.11.2024FileUploaded

What do I try to achieve?

I want a visual to show the rising operations filtered by "FileUploaded" per day.

Based on the example above the data for the visual should look like this

Datecount per dayrunning count for visual
01.11.202411
02.11.202434
03.11.202415
04.11.20241

6

 

I searched this forum and tried some solutions but nothing worked.

 

Maybe you have a good solution. 🙂

1 ACCEPTED SOLUTION

Try this one :

 

 

RunningTotalFileUploaded = 
VAR CurrentDate = MAX(Activity[Date Created])
VAR FilteredTable = 
    FILTER(
        ALL(Activity[Date Created]),
        Activity[Date Created] <= CurrentDate
    )
RETURN
CALCULATE(
    COUNTROWS(Activity),
    FilteredTable,
    Activity[Operation] = "FileUploaded"
)

 

 

 

 

If above measure still not workable, then try the summarize version given below. First will summarize the activity table by date created and operation and count and then do cummulative sum:

 

RunningTotalFileUploaded = 
VAR CurrentDate = MAX(Activity[Date Created])

VAR SummaryTable = 
SUMMARIZE(
    FILTER(
        ALL(Activity),
        Activity[Operation] = "FileUploaded"
    ),
    Activity[Date Created],
    Activity[Operation],
    "Count", COUNTROWS(Activity)
)

RETURN
SUMX(
    FILTER(
        SummaryTable,
        [Date Created] <= CurrentDate
    ),
    [Count]
)

 

 

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

8 REPLIES 8
Bibiano_Geraldo
Super User
Super User

Hi @FabvE ,

1- Create a Measure for Daily Count:

DailyCount =
CALCULATE(
    COUNTROWS('Activity'),
    'Activity'[Operation] = "FileUploaded"
)

 

2- Create a Measure for Running Total:

RunningCount =
VAR MaxDate = MAX('Activity'[Date Created])
RETURN
SUMX(
    FILTER(
        ALL('Activity'[Date Created]),
        'Activity'[Date Created] <= MaxDate
    ),
    [DailyCount]
)
FabvE
Helper I
Helper I

Thank you all for your replies, @shafiz_p @Poojara_D12 @Laxmanjatoth .

Unfortunately now I get the error "visual exceeds the available ressources". 😐 My table has +400k rows...

Try this one :

 

 

RunningTotalFileUploaded = 
VAR CurrentDate = MAX(Activity[Date Created])
VAR FilteredTable = 
    FILTER(
        ALL(Activity[Date Created]),
        Activity[Date Created] <= CurrentDate
    )
RETURN
CALCULATE(
    COUNTROWS(Activity),
    FilteredTable,
    Activity[Operation] = "FileUploaded"
)

 

 

 

 

If above measure still not workable, then try the summarize version given below. First will summarize the activity table by date created and operation and count and then do cummulative sum:

 

RunningTotalFileUploaded = 
VAR CurrentDate = MAX(Activity[Date Created])

VAR SummaryTable = 
SUMMARIZE(
    FILTER(
        ALL(Activity),
        Activity[Operation] = "FileUploaded"
    ),
    Activity[Date Created],
    Activity[Operation],
    "Count", COUNTROWS(Activity)
)

RETURN
SUMX(
    FILTER(
        SummaryTable,
        [Date Created] <= CurrentDate
    ),
    [Count]
)

 

 

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

Wow, thank you. The second one did it!!!!! (although my laptop is burning now 😄 )

will you send example file with 20 rows data ?

Laxmanjatoth
Resolver I
Resolver I

Running Total =
CALCULATE(
[Count per Day],
FILTER(
ALL('YourTableName'[Date Created]),
'YourTableName'[Date Created] <= MAX('YourTableName'[Date Created])
)
)





shafiz_p
Super User
Super User

Hi @FabvE  Try this:

RunningTotalFileUploaded = 
CALCULATE(
    COUNTROWS(Activity),
    FILTER(
        ALL(Activity),
        Activity[Date Created] <= MAX(Activity[Date Created]) &&
        Activity[Operation] = "FileUploaded"
    )
)

 

Output:

shafiz_p_0-1732697556799.png

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

Poojara_D12
Super User
Super User

Hi @FabvE 

To achieve this, you can create two measures:

 

Count per Day: This will count the occurrences of "FileUploaded" per day.

 

Count per Day = 
CALCULATE(COUNTROWS(Activity), Activity[Operation] = "FileUploaded")

 

Running Total: This will calculate the cumulative total of "FileUploaded" operations up to each date.

Running Total = 
CALCULATE(
   SUMX(FILTER(ALL(Activity), Activity[Date Created] <= MAX(Activity[Date Created])), [Count per Day])
)

 

After creating these measures, you can add them to a line or bar chart with Date Created on the axis, Count per Day for the value, and Running Total for the cumulative count.

This should give you the visual with the "count per day" and the "running count" as you described.

 

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Please Subscribe my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS  (360 remaining for 500 SUBS) Please support!!

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors