Forum Discussion

jsBrizius's avatar
jsBrizius
Icon for Helper I rankHelper I
10 years ago
Solved

Bar Chart add YTD bar

I have a bar chart that is grouping data by week for the last six weeks only (six bars).  I need to add a a seventh bar to the same chart at far left that has the YTD (year to date) data aggregated.  Is this possible?

  • jsBrizius's avatar
    jsBrizius
    10 years ago

    I am using DirectQuery.  I am not sure a calculated table is allowed?  Someone one another thread pointed out I can write a custom sql statement under the Advanced options of the connection.

4 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Icon for Microsoft Employee rankMicrosoft Employee

    jsBrizius

     

    What is your data like? I think it is possible with a calculated table. Union the last 6 week's data with the YTD data.
    Please be more specific on your scenario.

     

    • jsBrizius's avatar
      jsBrizius
      Icon for Helper I rankHelper I

      I am using DirectQuery.  I am not sure a calculated table is allowed?  Someone one another thread pointed out I can write a custom sql statement under the Advanced options of the connection.

      • Eric_Zhang's avatar
        Eric_Zhang
        Icon for Microsoft Employee rankMicrosoft Employee

        jsBrizius

         

        For directQuery, many DAX features are not supported. You can model your data in the "Edit Query window".

        May I know what database are your using.  As I have more experience on SQL, I'd prefer a custom sql statement too. Can you post some sample data? I think your question can be easy with a custom sql statement if I get some idea on your data.