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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
crln-blue
Post Patron
Post Patron

Looking for equivalent of Line-Bar combo in Excel to PowerBI

Hello!

 

I'm new to PowerBI (currently exploring) and I'm looking for possible replacement to the chart below:

crln-blue_0-1596437494852.png

It is made in excel where the line chart pertains to the 2019 data and the bars for the 2020 data. There are only 3 data columns used: a measure, a category (food type, corresponds to the colors of both the line and bars) and a date data.

 

I believe this is a bad way of representing data because it is quite confusing to the readers so I'm looking for another way to interpret it. There is no clustered stacked bars nor line-bar chart on PowerBI so my question is, is there another visual for this requirement? (I also tried hierarchy - I made a type & date hierarchy and placed it on the x-axis but it isn't right). 

 

Thanks in advance!

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @crln-blue 

To my knowledge, there is no visuals like this, but there is a workaround to get it.

Step1:

Create a measure for column

Bar measure = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2020))
Step2:
Create measure for different category

Line typeA = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019&&'Table'[category ]="A"))

Line typeB = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019&&'Table'[category ]="B"))

Line typeC = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019&&'Table'[category ]="C"))

 

Step3:

Now create a visual like this

1.JPG

and here is sample pbix file, please try it.

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.

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi  @crln-blue 

To my knowledge, there is no visuals like this, but there is a workaround to get it.

Step1:

Create a measure for column

Bar measure = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2020))
Step2:
Create measure for different category

Line typeA = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019&&'Table'[category ]="A"))

Line typeB = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019&&'Table'[category ]="B"))

Line typeC = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019&&'Table'[category ]="C"))

 

Step3:

Now create a visual like this

1.JPG

and here is sample pbix file, please try it.

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.

HI @v-lili6-msft , thanks for the reply. I applied your solution and it solved my problem (although I admit there's a more better way to represent my data instead of line-chart combo). Will close this thread now. 

amitchandak
Super User
Super User

Hi @amitchandak ! I also tried this but I still need my line chart to be a multiple line chart because I need to show the composition. Still, thanks for link!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.