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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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]))

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

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]))

Anonymous
Not applicable

@amitchandak Thanks a ton! Worked perfectly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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