Forum Discussion
Anonymous
6 years agoNot applicable
Line chart from 3 tables
Hi,
I have 3 tables as below:
ManufTable:
| ManufId | ManufName |
| 1 | ManufA |
| 2 | ManufB |
| 3 | ManufC |
MonthTable:
| MonthId | MonthShortName | MothFullName |
| 1 | Jan-19 | January |
| 2 | Feb-19 | February |
| 3 | Mar-19 | March |
| 4 | Apr-19 | April |
| 5 | May-19 | May |
| 6 | Jun-19 | June |
| 7 | Jul-19 | July |
| 8 | Aug-19 | August |
| 9 | Sep-19 | September |
| 10 | Oct-19 | October |
| 11 | Nov-19 | November |
| 12 | Dec-19 | December |
SalesTable:
| ManufId | Month | Sales |
| 1 | 1 | 689200 |
| 1 | 2 | 852624 |
| 1 | 3 | 427710 |
| 1 | 4 | 559398 |
| 1 | 5 | 549769 |
| 1 | 6 | 183417 |
| 1 | 7 | 126708 |
| 1 | 8 | 203347 |
| 1 | 9 | 631240 |
| 1 | 10 | 868961 |
| 1 | 11 | 166726 |
| 1 | 12 | 152378 |
| 2 | 1 | 486075 |
| 2 | 2 | 628491 |
| 2 | 3 | 416089 |
| 2 | 4 | 664931 |
| 2 | 5 | 378287 |
| 2 | 6 | 418267 |
| 2 | 7 | 454814 |
| 2 | 8 | 701295 |
| 2 | 9 | 576266 |
| 2 | 10 | 244606 |
| 2 | 11 | 591859 |
| 2 | 12 | 31740 |
| 3 | 1 | 311089 |
| 3 | 2 | 392370 |
| 3 | 3 | 479272 |
| 3 | 4 | 252425 |
| 3 | 5 | 324161 |
| 3 | 6 | 830742 |
| 3 | 7 | 448548 |
| 3 | 8 | 188729 |
| 3 | 9 | 261155 |
| 3 | 10 | 207371 |
| 3 | 11 | 557076 |
| 3 | 12 | 889613 |
Based on 3 tables above, how can I show the 3 lines of ManufA, ManufB and ManufC, which gives sales(Y-Axis) from Jan to Feb-19(X-Axis)?
Appreciate your help. Thank you.
Hi Anonymous ,
Make the following relationships:
- Manuf - Sales -> one to many
- Month - Sales -> one to many
Then create a line chart with the following format:
- Axis - MonthShortName
- Legend - ManufName
- Values - Sales
You can then use a slicer to filter the months.
Check PBIX file attach.
Regards,
MFelix
2 Replies
- MFelixSuper User
Hi Anonymous ,
Make the following relationships:
- Manuf - Sales -> one to many
- Month - Sales -> one to many
Then create a line chart with the following format:
- Axis - MonthShortName
- Legend - ManufName
- Values - Sales
You can then use a slicer to filter the months.
Check PBIX file attach.
Regards,
MFelix
- AnonymousNot applicable
Perfect! Thank you so much. Just as I wanted it to be :)