Forum Discussion
Create line diagram from excel sheet
- 9 years ago
Hi StanDaMan0505,
I suspect from what you have said, that you need to re-model your data to look something like this:Database Name Date Size DB1 05/03/2017 1.03 DB1 06/03/2017 1.05 DB2 05/03/2017 1.03 DB2 06/03/2017 1.05 DB3 05/03/2017 1.03 DB3 06/03/2017 1.05 Then put Date as the x-axis, Size as the Values, and Database Name as the Legend.
Hi StanDaMan0505,
I suspect from what you have said, that you need to re-model your data to look something like this:
| Database Name | Date | Size |
| DB1 | 05/03/2017 | 1.03 |
| DB1 | 06/03/2017 | 1.05 |
| DB2 | 05/03/2017 | 1.03 |
| DB2 | 06/03/2017 | 1.05 |
| DB3 | 05/03/2017 | 1.03 |
| DB3 | 06/03/2017 | 1.05 |
Then put Date as the x-axis, Size as the Values, and Database Name as the Legend.
- StanDaMan05059 years agoNew Member
Hi bullius,
Thank you for your reply.
Is there a way to let Power BI do that? :-)
Don't want to do that manually, because its over 100 databases and around 50 dates. Thats quite a few fields... Need to write a script for that.
Or do you have any other suggestions?
Regards
Stan
- bullius9 years ago
Helper V
Try this: Within Query Editor,
1. Select all of your Date columns
2. Select the "Transform" tab
3. Select "Unpivot Columns"
- StanDaMan05059 years agoNew Member
Hi bullius,
Thanks for the tip with the unpivot, but that did not work. It made some really strange table out of it :-)
But I wrote now a VBA script that changes the data into the format you suggested and loaded that data into BI. That works beautiful and exactly the way I wanted. Thank you very much for your help!
What I dont understand is that it works flawlessly in Excel.. Shouldnt it be possible to make a similar diagramm with the same data in BI as in Excel?
Anway. Thank you and have a nice weekend.
Cheers