cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
TD21 Regular Visitor
Regular Visitor

Help with Creating a Simple Chart

I'm having issue creating a very simple chart and would appreciate some help.

 

My data looks like this:

Order #    Region    State    Apple   Banana   Orange   Grape   Pineapple

A-001      South     LA        x        x        x        x      x

A-002      East      NY        x                 x        x

 

I would like to create a bar chart like the one below, with Region and State as slicers. And I can't seem to create this simple chart. Smiley Sad  Any help is greatly appreciated.

 

Sample file: https://drive.google.com/file/d/1aFz-bNYsWiNQ4yFhN6N6Uc7rqiOEqBFH/view?usp=sharing 

 

 

Chart.jpg

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Help with Creating a Simple Chart

In the query editor, select the order, region, and state columns the go to transform > unpivot > unpivot other columns:unpivotother.jpg

Then select the Value column and remove blanks, leave only the X's

Rename Attribute to Fruit and click close and apply.

Then you can add the fruit column to the axis and a simple measure to count the rows of the table to get your count by fruit.CountFruit.jpg

I have attached my sample .pbix for you to look at.

View solution in original post

4 REPLIES 4
Super User IV
Super User IV

Re: Help with Creating a Simple Chart

In the query editor, select the order, region, and state columns the go to transform > unpivot > unpivot other columns:unpivotother.jpg

Then select the Value column and remove blanks, leave only the X's

Rename Attribute to Fruit and click close and apply.

Then you can add the fruit column to the axis and a simple measure to count the rows of the table to get your count by fruit.CountFruit.jpg

I have attached my sample .pbix for you to look at.

View solution in original post

TD21 Regular Visitor
Regular Visitor

Re: Help with Creating a Simple Chart

Worked beautifully in Import mode. Thank you!

 

Out of curiosity, is there a similar function if using Live Connection to a SSAS tabular cube?

Super User IV
Super User IV

Re: Help with Creating a Simple Chart

You don't have the transform options when connecting to a SSAS model but you could transform the data before feeding it into SSAS using a UNION in a SQL view that would replicate the unpivot.

TD21 Regular Visitor
Regular Visitor

Re: Help with Creating a Simple Chart

I'll give UNION a try. At least now I have a back-up plan if that doesn't work out.

 

Thank you again. Appreciated.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors