Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Create a timeline view using the Stacked Bar Chart Visualiztion

Hopefully there's a Datanaut out there that can help.  I can, and have, for years been able to create time line views in Excel Charts using a Bar chart like so:

 

Excel Bar Chart

In Power BI, I have an ask to create a view just like this.  Our organzational security FORBIDS the use of 3rd party custom visuals so that is not a solution.

This is the closest I have been able to come:

 

 

Power BI Bar Chart

 

I am so close I can taste it, but cannot figure a way to first, make the axis values convert from the numeric format into date format, and then second, set it so these are monthly values, not every 50 days.

 

Anyone that wants a big Kudos from me that has a solution to this one, let me know!

 

Warmest Thanks in advance

 

11 Replies

  • v-evelk's avatar
    v-evelk
    Microsoft Employee

    Hello,

     

    Is it your own implementation of the visual? Do I correctly understand?

     

    Kind Regards,

    Evgenii Elkin,
    Software Engineer
    Microsoft Power BI Custom Visuals
    [email protected]

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yes,

       

      The Power BI visual I have created is the Stacked Bar Chart visualization from the standard set that comes with BI Desktop

       

      Did this answer your question?  Is my question posed in the wrong forum?

      • v-evelk's avatar
        v-evelk
        Microsoft Employee

        Yep, the thread is correct.

        Is it possible to look through your source code and a data set to better understand your issue?

        You could send them to [email protected]

         

        Kind Regards,

        Evgenii Elkin,
        Software Engineer
        Microsoft Power BI Custom Visuals
        [email protected]

  • Have you tried:

    make the axis values convert from the numeric format into date format:

    On the right you have the list with data fields, select the field which contains your date (now showing as a number). Then click on the ribbon on modeling tab, and for Data type select Date/time: 

     

     

    set it so these are monthly values, not every 50 days

    Have you tried adding a slicer? It is unfortunate that you are not allowed to use a custom visual, as the Timeline slicer in the marketplace is really what you'd need here. However the built in Slicer can at least help you. You could eventually try to add a new column which calculates the month, and then apply the slicer on that column.

     

    Hope this helps!

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your outreach on this matter.  I attempted your solution on the Modelling tab, but unless I am missing some other step, that just blows up the visual and I get the "Something is wrong with one or more of the fields" message.

       

      I will see what I might be able to do with a slicer or displaying some sort of rolling series of months.

      • ivostammis's avatar
        ivostammis
        Helper I

        I guess the bar chart doesn't work with dates on the value axis, tried this myself and couldn't get it to work either. 

         

        Just thinking out of the box: what you're building looks a lot like a project / activity chart, which normally could be displayed with a gantt chart. You mention that 3rd party visuals are forbidden, however Microsoft offers a custom visual in the marketplace (https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380765?tab=Overview). Strictly speaking this isn't 3rd party, as it is from Microsoft as well :) .