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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

date range 0 - 90 days, 90 - 180 days, 180 - 360 days

Hi, I have a set of data which i have a list of number of days for aging and i want to add a column that calculate the range by '0-90 days, 90-180 days, 181 - 360 days. Example, anything fall in 90 days, then it will show under the range 0 - 90 days in the range column. How can i create this column in power BI?

 

daydream1989_0-1679040404930.png

 

2 ACCEPTED SOLUTIONS
KeyurPatel14
Responsive Resident
Responsive Resident

HI @Anonymous ,
You can add a calculated column in PowerBI using below formula:
Resultcolumn = 
SWITCH(

Table1[Open Workflow Aging],

Table1[Open Workflow Aging] >0 && Table1[Open Workflow Aging] <=90,"0-90 days",

Table1[Open Workflow Aging] >90 && Table1[Open Workflow Aging] <=180,"90-180 days",

Table1[Open Workflow Aging] >180 && Table1[Open Workflow Aging] <=360,"180-360 days"
)

I hope this will solve your problem and if you have any queries then please let me know.
And if this helps you then please give it a kudos and accept it as a solution.
Thank you.

 

View solution in original post

Try this,

Resultcolumn = 
SWITCH(

TRUE(),

Table1[Open Workflow Aging] >0 && Table1[Open Workflow Aging] <=90,"0-90 days",

Table1[Open Workflow Aging] >90 && Table1[Open Workflow Aging] <=180,"90-180 days",

Table1[Open Workflow Aging] >180 && Table1[Open Workflow Aging] <=360,"180-360 days"
)

I have just changed first argument to TRUE().
If this solves your problem then please give it a kudos and accept it as a solution.
Thank you.

View solution in original post

5 REPLIES 5
KeyurPatel14
Responsive Resident
Responsive Resident

HI @Anonymous ,
You can add a calculated column in PowerBI using below formula:
Resultcolumn = 
SWITCH(

Table1[Open Workflow Aging],

Table1[Open Workflow Aging] >0 && Table1[Open Workflow Aging] <=90,"0-90 days",

Table1[Open Workflow Aging] >90 && Table1[Open Workflow Aging] <=180,"90-180 days",

Table1[Open Workflow Aging] >180 && Table1[Open Workflow Aging] <=360,"180-360 days"
)

I hope this will solve your problem and if you have any queries then please let me know.
And if this helps you then please give it a kudos and accept it as a solution.
Thank you.

 

Anonymous
Not applicable

Hi, but i get the below error. How can i fix it?

 

daydream1989_0-1679043620336.png

 

Try this,

Resultcolumn = 
SWITCH(

TRUE(),

Table1[Open Workflow Aging] >0 && Table1[Open Workflow Aging] <=90,"0-90 days",

Table1[Open Workflow Aging] >90 && Table1[Open Workflow Aging] <=180,"90-180 days",

Table1[Open Workflow Aging] >180 && Table1[Open Workflow Aging] <=360,"180-360 days"
)

I have just changed first argument to TRUE().
If this solves your problem then please give it a kudos and accept it as a solution.
Thank you.

Anonymous
Not applicable

Really thanks a lot!!!

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.