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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hlynurgudna
Frequent Visitor

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.

hlynurgudna_1-1662542021323.png


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

hlynurgudna_2-1662542480458.png

 

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

hlynurgudna_0-1662541790348.png


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

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hlynurgudna ,

 

Like this?

vmengzhumsft_0-1662975591902.png

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

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @hlynurgudna ,

 

Like this?

vmengzhumsft_0-1662975591902.png

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

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.