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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Divide into groups by time passed since updated

Hi,

 

I want to monitor how long time has passed since the values were updated. Does anyone know if there is a simple way to divide the values into groups based on the time passed. The four groups will be "24 hours ago", "1 week ago", "1 month ago" and "later".

 

You can find the pbix here: https://drive.google.com/file/d/1wjkaEM4wvv-plYSJR-HXdo9QKfRj5P19/view?usp=sharing

 

Julkku_0-1612454338200.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column like

 

New column =
var _days = datediff([update timestamp], today(),day)
return
switch(true(),
_day <=1 , "24 hours Ago",
_day <=7 , "A week ago ",
// Add other
"Way back" //Default
)

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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you for your help 🙂 @mahoneypat @amitchandak 

mahoneypat
Microsoft Employee
Microsoft Employee

To convert it to a measure, just wrap [update timestamp] with MAX( ) in @amitchandak 's expression.

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


amitchandak
Super User
Super User

@Anonymous , Create a new column like

 

New column =
var _days = datediff([update timestamp], today(),day)
return
switch(true(),
_day <=1 , "24 hours Ago",
_day <=7 , "A week ago ",
// Add other
"Way back" //Default
)

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

Hi @amitchandak ,

 

Thanks for your suggestion!

 

Is there a way to do this in a measure?

 

Or if not, can font color defining measures be based on calculated columns?

 

Juls

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.