Submitted by d bartlett on 2019/02/02 15:07
Anybody know -
 
Gantt Chart, how do I change the "Task Duration" Field (displayed as a column) from displaying days (default) to weeks?  Or is that even possible without creating unintended consequences everywhere else in my IQ file?
 
Alternately (better?), how do I create a new Field/column, driven by "Task Start" and "Task End", that will display weeks instead of days for duration of the Gantt task?
 
I've been attempting to do that from within "Manage Fields" and searching the online help and forums but cannot figure it out. 
 
thank you
Doug Bartlett

Comments

Hi Doug,
 
A couple ways come to mind:
  1. Create a number field with a row equation involving Task start / end, such as (task end - task start) / 7, or something more involved using the weekday function
  2. Format the existing duration field to show weeks instead of days, using the Format function
Tell me which you prefer and we can work out something
 
HTH !
 
Pierre_Admin
IQ Designer
 

d bartlett

2019/02/02 16:04

In reply to by Pierre_Admin

OK, thanks Pierre,
 
I'm concerned about reformatting the existing duration field, concerned that there might be unintended consequences somewhere else that relies upon current formatting.
 
So my prefence is a new number field based on 7 day weeks, but I'm not programming savvy so I'd need the process somehow made pretty clear.
 
Doug Bartlett

Pierre_Admin

2019/02/02 16:28

In reply to by d bartlett

[quote=d bartlett]
I'm concerned about reformatting the existing duration field, concerned that there might be unintended consequences somewhere else that relies upon current formatting.
[/quote]
FYI Formatting is just display and has absolutely no impact on the rest of IQ, stored will still be days...
If you still prefer a separate field (good choice certainly), is (end-start)/7 sufficient ? It isn't great for short durations, but not bad for longer ones.
If you want something accurate, it isn't hard to find the number of weekends, subtract it from the duration and divide by 5 working days
 
Pierre_Admin
IQ Designer
 

d bartlett

2019/03/25 12:07

In reply to by Pierre_Admin

HI Pierre, sorry for the delay in responding, been busy busy -
 
Because I'm typically working with multiple month/year projects, weeks are more practical for me than days.
 
So if there's an equation that can be entered somewhere ((end-start)/7) to convert days to weeks in the Task Duration Column/Field, that seems simplest and works for me.
 
I've searched for where to do that and presumably it's in Task Duration Field Properties, but I don't know how to effect that.
 
thank you
Doug Bartlett

d bartlett

2019/04/15 09:03

In reply to by d bartlett

Hi Pierre,
 
Any thoughts about the best way for changing Task Duration Field from days to weeks?
 
thanks
Doug Bartlett

Pierre_Admin

2019/04/15 12:20

In reply to by d bartlett

Hi Doug,
 
You can create a new number field with the following row equation: =[TaskDuration]/7
 
Click the refresh button (just right of the equation to update the field)
 
Another option is to create a smart field TaskDurationWk with this in options:
<source>select ItemID, TaskDuration / 7 as TaskDurationWk from ¯qTaskDuration </source>
 
 
Pierre_Admin
IQ Designer
 

d bartlett

2019/04/16 09:34

In reply to by Pierre_Admin

Used your first suggestion, created a new number field- thanks.
 
Last Question (I think) - how/where in field settings do I reduce the decimals from infinite to default of one?  for example,  1.123456789 to 1.1
 
thanks
Doug Bartlett

Pierre_Admin

2019/04/16 10:11

In reply to by d bartlett

In field properties > General > Format dropdown. Try 0.0
 
or, in the equation itself, such as =formatnumber( [TaskDuration] /7,1)
 
HTH !
 
Pierre_Admin
IQ Designer
 

d bartlett

2019/04/16 12:21

In reply to by Pierre_Admin

That Helped!  Thanks Pierre!
 
You should think about taking IQ to the marketplace one day.  Soon.
 
Doug Bartlett