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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sam95
New Member

How to display a 30 day count of values on a daily basis on a line chart in Power BI.

I've got the folllowing DAX measure, where I am trying to calculate the number of "Completed" treatments for a 30 day period.

 

Test Measure =
CALCULATE (COUNTROWS(FILTER(Treatments,
Treatments [Treatment Status] = "Completed")),
Treatments[Treatment Date] >= Treatments[Treatment Date] - 30)
 
Then I create a line chart, where I select my Test Measure and the date from a calendar table (I want to show this value on a daily basis)
sam95_0-1688034997786.png

 

But what the graph is showing, is the number of Completed treatments on a daily basis, what I want to do is for it to show me on a daily basis the number of "Completed" treatments for 30 days. How can I achieve this?

 
1 REPLY 1
Syk
Super User
Super User

It sounds like you want a running total.. I'd recommend watching this 7 minute video - dax code around 4 minutes in if you want to skip straight to it!

https://www.youtube.com/watch?v=fR0dI5UfZD8

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.