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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Days Open Grouping

Hello,

 

I'm looking to create groups for Days Open. I currently have a 'Task Created' Date/Time column and I wish to creat the following. 

 

New column for Days Open and then groups - 

 

0-7 Days

8-30 Days

31-60 Days

>61 Days

 

TIA

1 ACCEPTED SOLUTION
rohit_singh
Solution Sage
Solution Sage

Hi @Anonymous ,

1) Create calculated column for EndDate

 

EndDate = today()


2) Create calculated column for DaysOpen

 

DaysOpen = DATEDIFF(DaysOpen[StartDate], DaysOpen[EndDate], DAY)
 
3) Create calculated column for DaysOpenGrp
 
DaysOpenGrp =

if(DaysOpen[DaysOpen] <= 7 , "0-7 days",
if(DaysOpen[DaysOpen] > 7 && DaysOpen[DaysOpen] <= 30 , "8-30 days",
if(DaysOpen[DaysOpen] > 30 && DaysOpen[DaysOpen] <= 60 , "31-60 days",
if(DaysOpen[DaysOpen] > 60 , "> 61 days", BLANK()))))
 
Result

rohit_singh_0-1655720419261.png

 

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂


View solution in original post

2 REPLIES 2
rohit_singh
Solution Sage
Solution Sage

Hi @Anonymous ,

1) Create calculated column for EndDate

 

EndDate = today()


2) Create calculated column for DaysOpen

 

DaysOpen = DATEDIFF(DaysOpen[StartDate], DaysOpen[EndDate], DAY)
 
3) Create calculated column for DaysOpenGrp
 
DaysOpenGrp =

if(DaysOpen[DaysOpen] <= 7 , "0-7 days",
if(DaysOpen[DaysOpen] > 7 && DaysOpen[DaysOpen] <= 30 , "8-30 days",
if(DaysOpen[DaysOpen] > 30 && DaysOpen[DaysOpen] <= 60 , "31-60 days",
if(DaysOpen[DaysOpen] > 60 , "> 61 days", BLANK()))))
 
Result

rohit_singh_0-1655720419261.png

 

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂


Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Use below formula in a custom column where Days is the column name. Also note, >61 Days is wrong to say, it has to be >60 Days or >=61 Days

= if [Days]>60 then ">60 Days" else 
if [Days]>30 then "31-60 Days" else
if [Days]>8 then "8-30 Days" else "0-7 Days"

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.

Top Solution Authors