Forum Discussion
JoeJames
1 year agoNew Member
Help in creating a calculated column
Hi The table visualization below shows some of the fields that I have in my data table. Transmittal sent is a column coming from a table called TRN History WF Completed Date is a column in the Do...
- Anonymous1 year ago
Hi JoeJames ,
You can try formula like below to create calculated column:
WorkdaysBetween = VAR StartDate = 'Table'[StartDate] VAR EndDate = 'Table'[EndDate] VAR TotalDays = DATEDIFF(StartDate, EndDate, DAY) VAR Weekends = COUNTROWS( FILTER( ADDCOLUMNS( CALENDAR(StartDate, EndDate), "DayOfWeek", WEEKDAY([Date], 2) ), [DayOfWeek] = 6 || [DayOfWeek] = 7 ) ) RETURN TotalDays - WeekendsBest Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
shafiz_p
1 year agoSuper User
Hi JoeJames Try this:
DaysBetween =
DATEDIFF(SELECTEDVALUE('Table'[WF Completed Date]), SELECTEDVALUE('Table'[Transmittal Sent]), DAY)Considering both the dates are present in table visuals as well as relationship exist between the tables.
Hope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz