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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Trending Graph for a Date Calculated Measure

Hello, what I want to get is a line visual that shows 'Activity Health' over the last year.

 

Activity Heath is calculated from three other fields (items opened divided by the combination of items closed and cancelled). To get these components there is an Initiation Date, a Closed Date, and a Cancelled Date. Keep in mind that not all items have all these fields since not all are cancelled or closed. I've been fighting for a way to not only calculate this for the previous month, but also for showing the trend over the last year.

 

Help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

As per my understanding you can create below new columns and measure to retreive ActivityHealth across Each Month-Year.
Column 1

MonthYear = LEFT(FORMAT('Table'[OpenDate],"MMM"),3) & " - " & Convert(RIGHT('Table'[OpenDate],4),STRING)
Column 2 (Denominator)
ClosedCancelItems = 
If( ISBLANK('Table'[CancelDate]) , 0 , 1) + If( ISBLANK('Table'[ClosedDate]) , 0 , 1)
Measure 😞 Assuming Opendate will not be null/blank)
ActivityHealth = IFERROR( COUNT('Table'[OpenDate]) / SUM('Table'[ClosedCancelItems]) , 0).

 

If it's not working . Please share the sample PBIX of your requirement so that it might help me to provide proper DAX formulas.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

hi @Anonymous ,

 

So your requirement is to calculate No.of Items/(No.of Items Cancelled + Closed) per a month -year(MMM-YY)?

 

Anonymous
Not applicable

The activity health for a given month is equal to the number of items created that month divided by the sum of the items closed and cancelled that month. Then I want to be able to trend that over the last year. 

Anonymous
Not applicable

Hi @Anonymous 

 

As per my understanding you can create below new columns and measure to retreive ActivityHealth across Each Month-Year.
Column 1

MonthYear = LEFT(FORMAT('Table'[OpenDate],"MMM"),3) & " - " & Convert(RIGHT('Table'[OpenDate],4),STRING)
Column 2 (Denominator)
ClosedCancelItems = 
If( ISBLANK('Table'[CancelDate]) , 0 , 1) + If( ISBLANK('Table'[ClosedDate]) , 0 , 1)
Measure 😞 Assuming Opendate will not be null/blank)
ActivityHealth = IFERROR( COUNT('Table'[OpenDate]) / SUM('Table'[ClosedCancelItems]) , 0).

 

If it's not working . Please share the sample PBIX of your requirement so that it might help me to provide proper DAX formulas.

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

refer if this blog, how to deal with multiple dates can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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