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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Super User
Super User

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.