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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
felipetrin
Regular Visitor

Running count total by month (IMPOSSIBLE?)

Hello everyone!

 

To summarize my infos:
WHAT I HAVE: A database that shows when (DATE) a new machine (MACHINE) was added in my mini factoty and its level of importance (LEVEL OF IMPORTANCE) [Check out the picture in the end of this post].

WHAT I WANT: I want to check out the evolution of my machines in my mini factory detailing it by level of importance according when they were bought (DATE) [Check out the picture in the end of this post].

WHAT I'VE TRIED: I've tried this DAX Measure:

Measure =
CALCULATE(
     COUNTROWS(Table),
     FILTER(
          ALL(Table),
          Table[Date] <= MAX(Table[Date])
     )
)

PICTURE:

Picture:Picture:

 

Thanks for helping me!

1 REPLY 1
stevedep
Memorable Member
Memorable Member

Hi,

 

The code below should do the trick.

 

_RT = 
var _no = CALCULATE(DISTINCTCOUNT(NewTable[i]), ALL(NewTable[i]))
return
COUNTROWS(FILTER(ALL(NewTable), NewTable[imp] = SELECTEDVALUE(NewTable[i]) && [date] <= MAX(NewTable[date]))) / _no

 

It does require you to transform your table / add a new version of it:

 

NewTable = CROSSJOIN(SELECTCOLUMNS(VALUES('Table'[imp]),"i", [imp]),'Table')

 

In this video I show how to create the dashboard as seen below.

 

rt.png

 

Link to the file here

Pls mark as solution if so. Thumbs up for the effort are appreciated.

Kind regards, 

Steve. 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.