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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

cumulative count of counted text in a column

I would appreciate if you could assist me in the following.
 
I need a simple DAX for running the sum of counts of a column that contains the text.
 
I need to count, for instance, "Medium" from a column titled Level and then create a running sum of the counts. The expected visual counts by month for various years as a bar chart and as a line cumulative of counts by month.
 
I hope you would be able to help.
 
Thanks,
5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

So a running total is generally constructed along the lines of

 

Measure =

  VAR __Date = MAX('Table[Date])

  COUNTROWS(

    FILTER('Table',[Level] = "Medium" && 'Table'[Date] <= __Date)

  )

 

Column would be:

Column =

  VAR __Date = [Date]

  COUNTROWS(

    FILTER('Table',[Level] = "Medium" && 'Table'[Date] <= __Date)

  )

 

But sample data would help to make sure. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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...
Anonymous
Not applicable

 

Thanks Greg

 

Unfortunately still struggling........

 

not sure about "  __Date)"   what this underscore line refers to? and "'Table'[Date] " here the date column is from the same table,

 

Can you pls one more assist, thanks

 

Following is the sample of data, again,

 

IDYearlevelDate
1141900024002019Medium9/7/2019
1141900024202019serious9/10/2019
1141900024402019Medium9/14/2019
1141900024402019light9/14/2019
1141900024602019Medium9/17/2019
1151900002602019light9/24/2019
1141900024612019Medium9/17/2019
1141900024802019Medium9/19/2019
1161900044802019Medium6/7/2019
1161900044802019Medium6/7/2019
1161900044802019Medium6/7/2019
1161900044802019Medium6/7/2019
1161900044802019Medium6/7/2019
1161900044802019light6/7/2019
1161900044802019Medium6/7/2019
1161900044802019Medium6/7/2019
1161900044812019Medium6/8/2019
1161800018812018Medium3/19/2018
1161800018812018Medium3/19/2018
1161800018812018Medium3/19/2018
1161800018812018death3/19/2018
1161800018812018Medium3/19/2018
1151800003202018Medium3/21/2018
1161800019202018light3/20/2018
1161800019402018Medium3/21/2018
1161800019802018death3/21/2018
1161800019802018Medium3/21/2018
1011800000802018light3/16/2018
1011800000802018light3/16/2018
1161800019612018Medium3/21/2018
1141800008002018Medium3/22/2018
1161800019602018Medium3/21/2018
1161800019812018light3/21/2018
1161800019822018Medium3/21/2018
1161800019832018serious3/21/2018
1141800007802018Medium3/20/2018
1141800009202018Medium4/12/2018
1161800022402018Medium4/12/2018
2011800010802018Medium4/13/2018
1121800004002018light4/12/2018
1121800004002018Medium4/12/2018
3021800000802018death3/20/2018
3021800000802018serious3/20/2018
3021800000802018death3/20/2018
Anonymous
Not applicable

Hi

 

I tried the following  

 

measure 2 =
countrows(Filter( (data), data[level]="Death" && data[Date] <= MAX (data[Date]))
)
 
The above seems ok but not sure the error from following: too fee arguments are passed through filters.......
 
Column =
Countrows (FILTER(data), data[level]="death" && data[Date] <= MAX (data[Date])
)
 
please assist. 

You should delete the parentheses around data in your Filter.

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.