Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Bar chart using different data sources on axes

Dear all,

 

First time I'm using this Forum, I hope I did it well πŸ˜‰

I looked for this topic but I didn't find it. I have a very simple question: is it possible to link different data sources to bar chart, allocating them to different axes (please see exemple below)?

 

I basically have 3 different data sources (DATA1, DATA2 and DATA3) and they are all connected to common tables (e.g. calendar), however I did not figured a way to plot it similary to the image above.

 

Any guess?

Thanks a lot!

  • Anonymous actually create a table with 3 rows in it and data 1, data 2 and data 3 and then add  a measure like this

     

    Measure = 
    SWITCH ( 
    MAX ( NewTable[Data] ),
    "Data 1", SUM ( Data1Table[Value] ),
    "Data 2", SUM ( Data2Table[Value] ),
    "Data 3", SUM ( Data3Table[Value] )
    )
    
    

     

    On x-axis, use the column from this new table and above measure, and it should work.

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would ❀ Kudos if my solution helped. πŸ‘‰ If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    ⚑Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚑

3 Replies

  • Anonymous you can as far as x-axis is common between all 3 tables. 

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would ❀ Kudos if my solution helped. πŸ‘‰ If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    ⚑Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚑

  • Anonymous actually create a table with 3 rows in it and data 1, data 2 and data 3 and then add  a measure like this

     

    Measure = 
    SWITCH ( 
    MAX ( NewTable[Data] ),
    "Data 1", SUM ( Data1Table[Value] ),
    "Data 2", SUM ( Data2Table[Value] ),
    "Data 3", SUM ( Data3Table[Value] )
    )
    
    

     

    On x-axis, use the column from this new table and above measure, and it should work.

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would ❀ Kudos if my solution helped. πŸ‘‰ If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    ⚑Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚑

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi parry2k ,

      Thanks a LOT!

      It worked perfectly the solution using the measure πŸ˜