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

bar graph trend using slicer or chiclet

Hi Everyone,

 

I've been using PowerBI for some time now and like to think that I'm fairly proficient with it.  However, I'm stumped on something that seems easy to make but can't figure out how to do it.  Seeking your help.

 

I'm trying to create a bar graph showing a dept's profit for the year (jan-dec), so essentially the trend for the year.  In my example, I have 3 dept's with their profit/loss for each month.  As you can see, each dept is a column and the month's are a columns as well.  Given the way my data is setup, how can I create a graph that allows me to toggle between dept's to show 1 dept at a time.  Similar to using a slicer or chiclet.  I hope this makes sense.  Thank you all for your help.

 

data.PNGgraph.PNG

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

try to unpivot your dept's columns.

Than you can filter by Attribute column. 

 

unpivot Data.png

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

3 REPLIES 3
mussaenda
Super User
Super User

Hi @Anonymous 

 

you can use power query and unpivot the columns of the values. That way you can achieve your requirement

Hi @Anonymous ,

 

try to unpivot your dept's columns.

Than you can filter by Attribute column. 

 

unpivot Data.png

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

@mwegener , Thank you very much for your help!  I've never used the unpivot function before.  It's exactly what I needed.  

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.