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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
qball23351
New Member

Need to calculate monthly Total with time

I am hoping someone can help me here.   I have a data set that looks like this

 

Doc NameDateNum Pages
abc4/20/2023 8:15:30 PM500
def4/20/2023 9:05:59 PM100
ghi4/22/2023 6:46:08 PM50
jkl4/23/2023 7:32:54 PM200

 

What I am looking to do is get a running total of pages that have been processed

Doc NameDateNum Pagesrunning total
abc4/20/2023 8:15:30 PM500500
def4/20/2023 9:05:59 PM100600
ghi4/22/2023 6:46:08 PM50650
jkl4/23/2023 7:32:54 PM200850

 

Continue this process until the end of the month then start over again.

 

Basically a month to date total, but I need the total by each row meaning multiple rows per day.

 

1 REPLY 1
parry2k
Super User
Super User

@qball23351 

As a best practice, add a date dimension in your model and use it for time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools. Check the related videos on my YT channel

 

Add Date Dimension
Importance of Date Dimension
Time Intelligence Playlist

 

Once date table is there, add following measure and in the visual use month/date column from the date table and the measure:

 

MTD = 
CALCULATE ( 
   Table[Num Pages],
   DATESMTD ( 'Date Table'[Date] )
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.