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
alexw94
Helper I
Helper I

Need help creating a PowerBI graph please.

Hi,

 

I am looking to create the follow graph (right of screenshot) from the data in table (left of the screenshot) in Power BI. 

 

So far I have the below table in my power query editor exactly as you see it. 

 

I have ranked the top 10 trips and want them to be shown in parts in the first column of my proposed graph, but each of the top 10 to be dived into 10 parts in the graph and the size depending on the Length (KM) value. I then want the remain (none top 10) just to be shown as one whole value within the bar named "Other". 

 

Any ideas how I can get this to represent this data, so far I am not having much luck. Note, it is important that the length figures are displayed in each part of the the first bar. The "Other" bar I need all the total values of Length KM where "Other" is in the Category column. 

 

Screenshot is a rough drawing from excel. 

Screenshot 2023-03-07 133714.png

1 ACCEPTED SOLUTION

Hi @alexw94 ,

 

Please try to create a calculated column.

Category 2 = IF('Table'[Category]<>"Other",'Table'[Trip No],"Other")

vcgaomsft_0-1678782005300.png

Result.

vcgaomsft_1-1678782066949.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

7 REPLIES 7
alexw94
Helper I
Helper I

Is anyone able to help me with this please? I am a little stuck.

Hey Alex, did you run into any problems with my suggestion of a stacked column chart with km on Y-axis and TripNo in Legend, Category on Y axis? 

 

Hi @alexw94 ,

 

Please try to create a calculated column.

Category 2 = IF('Table'[Category]<>"Other",'Table'[Trip No],"Other")

vcgaomsft_0-1678782005300.png

Result.

vcgaomsft_1-1678782066949.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

AdaKAda
Helper I
Helper I

It looks exaclty like a stacked column chart with km on Y-axis and TripNo in Legend, Category on Y axis. 

Unfortunately the stacked column chart doesn't allow you to use the data label (i.e trip name) on the bars, but only the values. 

Thanks for your reply, I am not wanting to put the names of the columns on the bars. I know they can apear appear as you hover over them with the mouse. 

AmiraBedh
Memorable Member
Memorable Member

Can you please share the Excel file you are using ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

I am not able to do that unfortunatley.

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.