cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Multi-Line Diagram to compare plants with categories

Hello!

I've been trying to find a solution for this problem, but no luck so i figured i'll ask directly.

I have data structured like this:

 Region Category Month Plant Productivity North Iron 1 A 100 North Steel 1 B 200 South Steel 1 C 150 North Iron 1 D 50 South Iron 1 E 250 South Steel 1 F 100

I want to create a Line diagram where i can choose a plant and compare it's productivity/month to other plants OR the average productivity of the region/category.

For example, if i select A, C and "North" i'd like to have three lines in my graph, one for each selection.

I am able to create comparisons between plants and plants, or categories and categories. But mixing them is where i run into a wall. I have tried to use a data hierarchy, but if i choose "North" it shows A, B and D, instead of a single line for "North."

Thank you in advance!

/Joe

1 ACCEPTED SOLUTION
Community Support

Hi @Anonymous ,

Would you please create a calculated table to combine all dimension you want to show in the line chart:

``````Table 2 =
UNION (
SUMMARIZE (
'Table',
'Table'[Region],
'Table'[Month],
"Productivity", SUM ( 'Table'[Productivity] )
),
SUMMARIZE (
'Table',
'Table'[Category],
'Table'[Month],
"Productivity", SUM ( 'Table'[Productivity] )
),
SUMMARIZE (
'Table',
'Table'[Plant],
'Table'[Month],
"Productivity", SUM ( 'Table'[Productivity] )
)
)``````

use the new region column for slicer and you can compare value in different dimension( column chart is used because of the lack of sample data):

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EYiTYAsQOVhIsKtUPJNgjTkBpopZGgUjHWtIu-6u1h9haw?e=4kfnJH

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,

Dedmon Dai

4 REPLIES 4
Helper III

Hi @Anonymous,

Can you please explain what type of chart you need. I am pretty much did not get what you need !!!! 😦

Thanks,

Deepan

Anonymous
Not applicable

Hello! Sorry, my english is a little bit rusty. I am talking about a Multi-Line Graph

In this case, i'm comparing 3 different plants. However, i would also like to be able to add a line for "North".

Community Support

Hi @Anonymous ,

Would you please create a calculated table to combine all dimension you want to show in the line chart:

``````Table 2 =
UNION (
SUMMARIZE (
'Table',
'Table'[Region],
'Table'[Month],
"Productivity", SUM ( 'Table'[Productivity] )
),
SUMMARIZE (
'Table',
'Table'[Category],
'Table'[Month],
"Productivity", SUM ( 'Table'[Productivity] )
),
SUMMARIZE (
'Table',
'Table'[Plant],
'Table'[Month],
"Productivity", SUM ( 'Table'[Productivity] )
)
)``````

use the new region column for slicer and you can compare value in different dimension( column chart is used because of the lack of sample data):

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EYiTYAsQOVhIsKtUPJNgjTkBpopZGgUjHWtIu-6u1h9haw?e=4kfnJH

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,

Dedmon Dai

Helper III

I am afraid it is not possible at this point. Because, the Region is a different category when compared with Month/Productivity.... So PBI is not able to provide relationship etween them !!!!!

If you have a chance to change/modify your request, I would be glasd to provide you with a solution.

Cheers!!!!!!!!!!!!!!!!!!!!!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.