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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
CR
Resolver II
Resolver II

conditional values according to the delay with today

Hi everybody!

 

I'm trying to get a visual highlighting delays like 1 week, 2 weeks, 3 weeks, 1 month, 2 months, 3 months and more than 6 months.

 

To calculate the delay, I get a column entitled Response Due Date.

 

The aim is that, according to the gap between TODAY() and the date available in the column Response Due Date, the appropriate value (see below) will be displayed.

 

For the moment, I only get the measure Delay = INT(TODAY()-('mytable'[Response Due Date].[Date])) that gives me the gap with a number of days. Now, I have to get this kind of result if between 0 and 7 I want to see 1 week elseif between 8 and 14 I want to see 2 weeks, etc.

 

I'm not sure it needs to be done with a measure, maybe a custom column in the query editor but waybe I'm wrong.

 

Thanks for your attention.

 

Regards,

CR

1 ACCEPTED SOLUTION
CR
Resolver II
Resolver II

Hi,

I finally found a way to solve it so let me explain how I proceeded.

I just added a calculated column with this specific code:

 

Column = IF('mytable'[Delay]<0;"on time";
            IF(AND('mytable'[Delay]>0;'mytable'[Delay]<=7);"1 week";
                IF(AND('mytable'[Delay]>7;'mytable'[Delay]<=14);"2 weeks";
                    IF(AND('mytable'[Delay]>14;'mytable'[Delay]<=21);"3 weeks";
                        IF(AND('mytable'[Delay]>21;'mytable'[Delay]<=28);"4 weeks";
                            IF(AND('mytable'[Delay]>28;'mytable'[Delay]<=90);"1 month";
                            IF('mytable'[Delay]>90;"more than 3 months";"TO CHECK")
                    ))))))

Well, first a measure to calculate the number of days between 2 dates, then a calculated column based on this measure.

 

I like this application !!!!!!!!!!!!!!!

 

CR

View solution in original post

1 REPLY 1
CR
Resolver II
Resolver II

Hi,

I finally found a way to solve it so let me explain how I proceeded.

I just added a calculated column with this specific code:

 

Column = IF('mytable'[Delay]<0;"on time";
            IF(AND('mytable'[Delay]>0;'mytable'[Delay]<=7);"1 week";
                IF(AND('mytable'[Delay]>7;'mytable'[Delay]<=14);"2 weeks";
                    IF(AND('mytable'[Delay]>14;'mytable'[Delay]<=21);"3 weeks";
                        IF(AND('mytable'[Delay]>21;'mytable'[Delay]<=28);"4 weeks";
                            IF(AND('mytable'[Delay]>28;'mytable'[Delay]<=90);"1 month";
                            IF('mytable'[Delay]>90;"more than 3 months";"TO CHECK")
                    ))))))

Well, first a measure to calculate the number of days between 2 dates, then a calculated column based on this measure.

 

I like this application !!!!!!!!!!!!!!!

 

CR

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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