Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Goodday,
I have a table with 2 dimensions and 2 measures that use the same dimension.
I would like to make a line chart from this, with showing all lines. But i seem to be unable to add both measures in the line chart. Why is this and how can i fix this?
Solved! Go to Solution.
Hi @Rollow
Based on your table, you want to create a line chart showing both Measure 1 and Measure 2 across different dimensions over two years. The issue you're experiencing is likely due to how your data is structured and how your visualization tool handles multiple measures.
Most visualization tools expect data in a "tidy" format where:
Each variable forms a column
Each observation forms a row
Each type of observational unit forms a table
Your current table has measures spread across columns, which can make it difficult to plot both measures simultaneously.
Go to "Transform Data" in Power BI
Select your table
Choose both Measure 1 and Measure 2 columns (hold Ctrl)
Click "Unpivot Columns" under the Transform tab
Rename the new columns:
"Attribute" → "Measure_Type"
"Value" → "Measure_Value"
Year Dimension Measure_Type Value 2023-2024 DH Measure 1 2.6 2023-2024 DH Measure 2 2.86 2023-2024 GEM Measure 1 2.5 2023-2024 GEM Measure 2 2.85 ... (and so on for all rows)
In this format, you can:
Put Year on the X-axis
Put Value on the Y-axis
Use Dimension for color encoding (lines)
Use Measure_Type to create separate lines for each measure
Select the Line Chart visualization
Configure fields:
X-axis: Year
Y-axis: Measure_Value
Legend: Measure_Type (to show both measures)
Details: Dimension (to separate lines by DH, GEM, etc.)
If you prefer not to transform data:
Select the "Line and Column Chart" visualization
Configure:
Shared X-axis: Year
Column Y-axis: Measure 1
Line Y-axis: Measure 2
Legend: Dimension
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! Thank you.
Hi @Rollow
Based on your table, you want to create a line chart showing both Measure 1 and Measure 2 across different dimensions over two years. The issue you're experiencing is likely due to how your data is structured and how your visualization tool handles multiple measures.
Most visualization tools expect data in a "tidy" format where:
Each variable forms a column
Each observation forms a row
Each type of observational unit forms a table
Your current table has measures spread across columns, which can make it difficult to plot both measures simultaneously.
Go to "Transform Data" in Power BI
Select your table
Choose both Measure 1 and Measure 2 columns (hold Ctrl)
Click "Unpivot Columns" under the Transform tab
Rename the new columns:
"Attribute" → "Measure_Type"
"Value" → "Measure_Value"
Year Dimension Measure_Type Value 2023-2024 DH Measure 1 2.6 2023-2024 DH Measure 2 2.86 2023-2024 GEM Measure 1 2.5 2023-2024 GEM Measure 2 2.85 ... (and so on for all rows)
In this format, you can:
Put Year on the X-axis
Put Value on the Y-axis
Use Dimension for color encoding (lines)
Use Measure_Type to create separate lines for each measure
Select the Line Chart visualization
Configure fields:
X-axis: Year
Y-axis: Measure_Value
Legend: Measure_Type (to show both measures)
Details: Dimension (to separate lines by DH, GEM, etc.)
If you prefer not to transform data:
Select the "Line and Column Chart" visualization
Configure:
Shared X-axis: Year
Column Y-axis: Measure 1
Line Y-axis: Measure 2
Legend: Dimension
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! Thank you.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |