Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Column and Line Chart with multiple lines from one column

Here's a template dataset:
(PBI file: categorysales.pbix)

 

dataset.PNG

 

Next, I put it into a column chart to see total sales per month:

 

months.PNG

 

If I want to see how well each of the categories are performing for each month, a column and line chart by default does not work:

 

countofcate.PNG

 

What is possible is creating measures per category and adding it to the Line Values:

 

Bikemeasure = 
    CALCULATE(SUM(Table1[Profit]), Table1[Category] = "Bike")

I can add one for each category, and add them to the chart and get the results I want:

 

multiplemeasures.PNGasd

 

This gets the job done, but in a real-life dataset, I will end up with quite a few measures (X columns * Y types). 

Is there a better way than this? Can variables be used within the measure, so that I end up with only one measure per column? 

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

To my knowledge, the "lenged" column only affects the columns in a combo chart in power bi for now.

So for your requirement, there are two workaround for you refer to:

1. As you said, create different measure for each category and then drag them in Line values.

2. Exchange Line values and Column values, and then drag category into column series.

 

Regards,

Lin

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.