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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 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.