cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to transform Line and Clustered column chart to Line and Stacked chart

Hello, powerbi community! I would like to transform Line and Clustered column chart to Line and Stacked chart. The Line and Clustered column chart consist 3 measures as a data source. However while transforming I just dont want to stack measures which default ability of line and stacked charts. The 2 measures has certain amout of data in common. For example Total Vehicle Sales = Car Sales + Van Sales. As it can be seen below total sales depicted with yellow column and car sales with orange. I would like to transform it to second visual. Yellow is again total sales and orange is car sales. The total sales exceeding slightly car sales because it includes small sales number of van sales. 

 

Mikail_0-1632988934611.png

Mikail_1-1632988980566.png

 

Thanks in advance! 

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

Hi  @Anonymous ,

 

First create a dim table as below:

vkellymsft_0-1633422620943.png

 

Then create a column as below:

rank = RANKX('Table (2)','Table (2)'[Measure 2],,DESC,Dense)

Then copy column category and make it sort by rank:

vkellymsft_1-1633422690736.png

 

Then use the copy one as column series and you will see:

vkellymsft_2-1633422744582.png

Check my sample .pbix file attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

First create a dim table as below:

vkellymsft_0-1633422620943.png

 

Then create a column as below:

rank = RANKX('Table (2)','Table (2)'[Measure 2],,DESC,Dense)

Then copy column category and make it sort by rank:

vkellymsft_1-1633422690736.png

 

Then use the copy one as column series and you will see:

vkellymsft_2-1633422744582.png

Check my sample .pbix file attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

Pragati11
Super User
Super User

Hi @Anonymous ,

 

Can you add details to your query please like screenshots, measure used, existing chart created, etc.?

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors