Forum Discussion
Creating a timeline visual with milestones (Work around)
Visit: https://ideas.powerbi.com/forums/265200-power-bi?WT.mc_id=Community&query=milestone to vote for some of the milestone ideas for a more comprehensive solution.
Here is a solution for a 'Gantt' type chart with Milestones. Improvements and feedback appreciated!
Sample in Power BI:
Limitations:
- Fixed predefined date timeframe required
- Uses table visual
- Web location required to host Milestone images
Steps:
1) Copy milestone images required to a public location, eg: www.mywebsite.com/milestone/images. Include a 'blank/transparent' png image for IE (some versions of IE will show a square box). Recommended max size 24 px by 24 px for icons.
2) Update data source (eg Excel, SQL) to return the image url required for the corresponding month, eg:
Row 1 of data set:
-- Task/Milestone Description: Milestone 1
-- Date: 24/01/2019
-- [Jan 2019] = http://www.mywebsite.com/milestone/images/milestone-red.png
-- [Feb 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [March 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [April 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [May 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [June 2019] = http://www.mywebsite.com/milestone/images/blank.png
Row 2 of data set:
-- Task/Milestone Description: Milestone 2
-- Date: 11/02/2019
-- [Jan 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [Feb 2019] = http://www.mywebsite.com/milestone/images/milestone-green.png
-- [March 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [April 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [May 2019] = http://www.mywebsite.com/milestone/images/blank.png
-- [June 2019] = http://www.mywebsite.com/milestone/images/blank.png
Blank png images are required for each 'month column' for IE, as some versions of IE will display a square box in the table cells with no values.
A dax switch function can also be used to build the Image URL's.
3) Import data into Power BI from data source
4) Create Table with Values for each month as per screenshot below
5) Click on each of the Fields (months) and set the Modeling -> Data Category to Image URL as per screenshots below
6) Format table and add in extra headers as text boxes above the tables and lines to separate 2019, 2020
1 Reply
- v-juanli-msft
Community Support
Hi Anonymous
I'm interested with your workaround.
Could you show your pbix here so i can understand better?
Best Regards
Maggie