The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have to create gantt chart where my start and end are just seconds. There is no date. I need to plot the start and end of a task in seconds. I would prefer the Gantt visual to use the one that Microsoft has created to not get into licensing requirements by third party vendor visuals.
For example this is one of my data:
I need to visualize each tone as a task with a start and end time for each tone being gantt chart bars.
I tried changing the date_type to second. But Power BI (Fabric as well as Desktop) would crash if I go any granular then Hour.
Just for checking I selected Hour and visualized the Gantt chart and it comes up like this:
The top axis shows up like this when scrolled to the right:
I am unable to add a Duration in the visual with the tone_duration column I have. It just wont accept it.
In short I am trying to do this:
But I can only achieve this by using a third-party Gantt chart (MAQ Software) but not with the one by Microsoft.
Can this be done using the Gantt chart on Power BI that I am trying to achieve?
Thank you.
Solved! Go to Solution.
Hi, @priteshb
As you have noted, the current offerings from Microsoft may not fully achieve the ideal third-party visualisation results you are aiming for. However, it is possible to achieve the following results:
1.Please note that the start date and end date fields need to be of the datetime type. It is recommended to use the TIME() function for conversion:
startdate = TIME(0,0,'Table'[start])
enddate = TIME(0,0,'Table'[end])
Here is a detailed description of the data required for this visualisation:
2.Secondly, regarding the issue of not being able to include Duration, based on my testing and understanding, it is due to the end date already having content, causing a conflict between the two.
3.Lastly, for your visualisation, I suggest that when you change the time type to seconds, you also adjust the parameters in the following position. This will make your visual object more aesthetically pleasing.
Please find the attached pbix relevant to the case.
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @priteshb
As you have noted, the current offerings from Microsoft may not fully achieve the ideal third-party visualisation results you are aiming for. However, it is possible to achieve the following results:
1.Please note that the start date and end date fields need to be of the datetime type. It is recommended to use the TIME() function for conversion:
startdate = TIME(0,0,'Table'[start])
enddate = TIME(0,0,'Table'[end])
Here is a detailed description of the data required for this visualisation:
2.Secondly, regarding the issue of not being able to include Duration, based on my testing and understanding, it is due to the end date already having content, causing a conflict between the two.
3.Lastly, for your visualisation, I suggest that when you change the time type to seconds, you also adjust the parameters in the following position. This will make your visual object more aesthetically pleasing.
Please find the attached pbix relevant to the case.
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
This is exactly what I was looking for. Would have been nice if the data type = second could have customisable axis lengths. But minutes will do for now. Thank you @Anonymous. I marked your answer as an accepted solution.
One additional question: How do I get each of the tones to show different colors? I added tone as legend but it does not differentiate each tone to different colors.
Hi, @priteshb
Thank you for your swift response, and I appreciate your recognition of my answer by accepting it as the solution.
Regarding your new question:
You can create a new calculated column that fully references the “tone” column as the type. For example:
Column = 'Table'[tone]
Then, you can modify the colour in the position shown in the image below:
I hope the final result meets your expectations:
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.