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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors