Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Timeline Calculaction

Hi to All,

I am workinng on a dashboard where i need timeline

My total working day in a month 25

Passed day in a month 24 (excludes weekend and holidays) as per Today

Timeline =96%

what i want i'll tell you guys

today my Timeline will looks like 'Timeline = Time Elapsed : 96% (24 of 25 Working Days)' 

Time line table for your reference

 

Pls help me 

 

Day NameInvDateTotalWorkingDayDayRemainDayPassedTimeline%Time Elapsed
Wed6/1/2022252514%Time Elapsed : 4% (1 of 25 Working Days)
Thu6/2/2022252428%Time Elapsed : 8% (2 of 25 Working Days)
Fri6/3/20222523312%Time Elapsed : 12% (3 of 25 Working Days)
Sat6/4/20222522416%Time Elapsed : 16% (4 of 25 Working Days)
Sun6/5/20222522416%Time Elapsed : 16% (4 of 25 Working Days)
Mon6/6/20222521520%Time Elapsed : 20% (5 of 25 Working Days)
Tue6/7/20222520624%Time Elapsed : 24% (6 of 25 Working Days)
Wed6/8/20222519728%Time Elapsed : 28% (7 of 25 Working Days)
Thu6/9/20222518832%Time Elapsed : 32% (8 of 25 Working Days)
Fri6/10/20222517936%Time Elapsed : 36% (9 of 25 Working Days)
Sat6/11/202225161040%Time Elapsed : 40% (10 of 25 Working Days)
Sun6/12/202225161040%Time Elapsed : 40% (10 of 25 Working Days)
Mon6/13/202225151144%Time Elapsed : 44% (11 of 25 Working Days)
Tue6/14/202225141248%Time Elapsed : 48% (12 of 25 Working Days)
Wed6/15/202225131352%Time Elapsed : 52% (13 of 25 Working Days)
Thu6/16/202225121456%Time Elapsed : 56% (14 of 25 Working Days)
Fri6/17/202225111560%Time Elapsed : 60% (15 of 25 Working Days)
Sat6/18/202225101664%Time Elapsed : 64% (16 of 25 Working Days)
Sun6/19/202225101664%Time Elapsed : 64% (16 of 25 Working Days)
Mon6/20/20222591768%Time Elapsed : 68% (17 of 25 Working Days)
Tue6/21/20222581872%Time Elapsed : 72% (18 of 25 Working Days)
Wed6/22/20222571976%Time Elapsed : 76% (19 of 25 Working Days)
Thu6/23/20222562080%Time Elapsed : 80% (20 of 25 Working Days)
Fri6/24/20222552184%Time Elapsed : 84% (21 of 25 Working Days)
Sat6/25/20222542288%Time Elapsed : 88% (22 of 25 Working Days)
Sun6/26/20222542288%Time Elapsed : 88% (22 of 25 Working Days)
Mon6/27/20222532392%Time Elapsed : 92% (23 of 25 Working Days)
Tue6/28/20222522496%Time Elapsed : 96% (24 of 25 Working Days)
Wed6/29/202225125100%Time Elapsed : 100% (25 of 25 Working Days)
Thu6/30/202225026104%Time Elapsed : 104% (26 of 25 Working Days)
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    Please create these calculated columns.

    Month = 
    MONTH ( 'Table'[Date] )
    WorkDay = 
    IF ( WEEKDAY ( 'Table'[Date], 2 ) = 7 , 0, 1 )
    TotalWorkingDay = 
    25
    DayPassed = 
    COUNTX (
        FILTER (
            'Table',
            'Table'[WorkDay] = 1
                && 'Table'[Month] = EARLIER ( 'Table'[Month] )
                && 'Table'[Date] <= EARLIER ( 'Table'[Date] )
        ),
        'Table'[Date]
    )
    DayRemain = 
    'Table'[TotalWorkingDay] - 'Table'[DayPassed] + 1
    Timeline% = 
    DIVIDE ( 'Table'[DayPassed], 'Table'[TotalWorkingDay] )

    The PBIX file is attached for reference.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

4 Replies

  • Anonymous , You need to have working flag

     

    example

    workday column

    if(weekday([Date], 2) =1, 0,1)

     

     

    Measures

    days=  countx(filter(Table, Table[workday] =1), [Date])

     

    days in month =  calculate(countx(filter(Table, Table[workday] =1), [Date]), allexcept(Table, Table[Month Year]) )

     

    then you can divide two

  • Anonymous's avatar
    Anonymous
    Not applicable

    allexcept(Table, Table[Month Year]) )

    do i need to add a coulmn in my table for Month year

  • Anonymous's avatar
    Anonymous
    Not applicable

    TimeElapsed should come like if my InvDate is this(6/28/2022) than Than TimeElapsed will this (Time Elapsed : 96% (24 of 25 Working Days)

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Please create these calculated columns.

    Month = 
    MONTH ( 'Table'[Date] )
    WorkDay = 
    IF ( WEEKDAY ( 'Table'[Date], 2 ) = 7 , 0, 1 )
    TotalWorkingDay = 
    25
    DayPassed = 
    COUNTX (
        FILTER (
            'Table',
            'Table'[WorkDay] = 1
                && 'Table'[Month] = EARLIER ( 'Table'[Month] )
                && 'Table'[Date] <= EARLIER ( 'Table'[Date] )
        ),
        'Table'[Date]
    )
    DayRemain = 
    'Table'[TotalWorkingDay] - 'Table'[DayPassed] + 1
    Timeline% = 
    DIVIDE ( 'Table'[DayPassed], 'Table'[TotalWorkingDay] )

    The PBIX file is attached for reference.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data