Forum Discussion

hlynurgudna's avatar
hlynurgudna
Frequent Visitor
3 years ago
Solved

Create Gannt Chart data from tasks

Hi all

I am trying to create data most likely very similar to gannt chart data
 Here below is an example of my data.
I have task 1 & 2 and in each line(task) I have a few columns with details about that specific task. Worker, type, start date, end date etc.


What I would like to create is somethink like this here below,
The count column tells me if there was an ongoing task that day, so the first line would be (24-5)/24 = 0,79 since that task started at 05:00. 
When the same task ends (Task 1, Type A) the count on 7.9.2022 would then be 0,67 since it ended 16:00 and therefor (16/24) = 0,67

 

Here below is a screenshot of the gaant chart I am using
The reason why I need to create this dataset here below is so I can properly analyse each task, type etc.
As an example one of the things I need to be able to analyse is to calculate how many days went into Task A each month


I have tried to create a new summarized table where I summarize on the date, type and task but I have still not been able to make it work

Best regards

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi hlynurgudna ,

     

    Like this?

    create the following measure:

    Measure 2 = 
    VAR _S = SELECTEDVALUE('Table'[index])
    var _min = MINX(FILTER(ALLSELECTED('Table'),[Type]=MAX('Table'[Type])),[index])
    var _max =MAXX(FILTER(ALLSELECTED('Table'),[Type]=MAX('Table'[Type])),[index])
    return
    SWITCH(SELECTEDVALUE('Table'[Type]),"A",IF(_min = _S, 0.79,IF(_max = _S,0.67,1)),IF(_min = _S,0.17,IF(_max = _S,1,1)))

     

    You can also refer to my pbix file for better understanding

     

    Best regards,

    Community Support Team Selina zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi hlynurgudna ,

     

    Like this?

    create the following measure:

    Measure 2 = 
    VAR _S = SELECTEDVALUE('Table'[index])
    var _min = MINX(FILTER(ALLSELECTED('Table'),[Type]=MAX('Table'[Type])),[index])
    var _max =MAXX(FILTER(ALLSELECTED('Table'),[Type]=MAX('Table'[Type])),[index])
    return
    SWITCH(SELECTEDVALUE('Table'[Type]),"A",IF(_min = _S, 0.79,IF(_max = _S,0.67,1)),IF(_min = _S,0.17,IF(_max = _S,1,1)))

     

    You can also refer to my pbix file for better understanding

     

    Best regards,

    Community Support Team Selina zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly