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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Create column chart from SharePoint Online list with data modelling

Hi,

I am new to Power BI.

My data set looks like this:

Soumo777_0-1621861076478.png

I want my column graph to look like this:

Soumo777_1-1621861115822.png

How do I achieve this?

Thanks in advance for all the help.

1 ACCEPTED SOLUTION

@Anonymous , No pets on axis and a measure 

measure = count(Table[Pets]) on values should do

 

If you want a table

 

new Table  =

summarize(Table, Table[pets], "Count", count(Table[Pets]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , This counts pets with pets on-axis.

With conditional formatting measure with field value option

 

Color = Switch(true(),

max(Table[Pets] ="Cat" , "Red",

max(Table[Pets] ="Dog" , "Yellow",

// Add other

"Green" //default

 

)

 

For conditional formatting refer PowerBI Abstract Thesis: How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi @amitchandak ,

But in order to achieve this, I think my data source should look like this:

Soumo777_0-1621862683031.png

How do I model it in this way?

@Anonymous , No pets on axis and a measure 

measure = count(Table[Pets]) on values should do

 

If you want a table

 

new Table  =

summarize(Table, Table[pets], "Count", count(Table[Pets]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak Thanks a ton! Worked perfectly.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.