The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I am trying to create a line graph to show exactly as this picture from excel. I can't seem to get the data to display this way in Power Bi. I have tried numerous tweaks and nothing will display my graph so that each line represents the week's worth of results. Excel does this straight away so I'm not sure why PBI won't do the same? Thank you
Solved! Go to Solution.
This graph will be made up of 3 different data points: X-Axis, Y-Axis and Legend.
Based on what i see:
X-Axis is your Column names
Y-Axis is your Sum of Values
Legend is your Dates.
You immediate problem will be the column names. So my suggestion will be to go into Transform Data and do an Unpivot of your data. This should give you an 'Attribute' column which contains the column heading names, and then 2nd column which holds your values. Now you should be able to get that X-Axis working.
This graph will be made up of 3 different data points: X-Axis, Y-Axis and Legend.
Based on what i see:
X-Axis is your Column names
Y-Axis is your Sum of Values
Legend is your Dates.
You immediate problem will be the column names. So my suggestion will be to go into Transform Data and do an Unpivot of your data. This should give you an 'Attribute' column which contains the column heading names, and then 2nd column which holds your values. Now you should be able to get that X-Axis working.
Thank you so much, this has worked nicely to achieve what I was after.
It sounds like you're encountering some difficulty replicating the exact graph layout from Excel in Power BI. Let me guide you through how you can potentially achieve this in Power BI:
Data Structure: Ensure your data is structured properly. You should have columns for the date, the category (in your case, "Week"), and the values you want to plot.
Data Model: Import your data into Power BI and create a proper data model. Make sure that your date column is recognized as a date data type.
Create a Line Chart: Drag the "Week" column into the Axis field well and the value you want to plot into the Values field well. This should automatically generate a line chart.
Adjust Axis: If your "Week" column is not being recognized as a time series, you may need to adjust the axis type to be a continuous (date) axis rather than a categorical axis. You can do this by selecting the axis and then going to the Format pane to change the axis type.
Data Grouping: If your data isn't already grouped by week, you may need to create a new calculated column to group your data by week. You can use DAX functions like WEEKNUM() and YEAR() to achieve this.
Line Styles and Colors: You can adjust the line styles and colors in the formatting options to match the appearance you want.
If you're still having trouble replicating the exact graph from Excel, it might be helpful to provide more specific details about your data structure and the issues you're encountering in Power BI.
Please give Thumbs up or Accept this solution if it helped you out