web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bar Chart (Grouped)
Power Apps
Answered

Bar Chart (Grouped)

(0) ShareShare
ReportReport
Posted on by 28

I have a SP list and it basically has list items that contain a bunch of information on Outages. Two records we are capturing is Type of Outage and Where at.

 

Outage Type - Choice Column

Where it is - Standard one line text column

 

I am trying to use a Bar Chart to show How Many Outages were Critical and Where they were so im thinking a side by side bar for each. I am also thinking of pulling this off a Gallery behind the bar chart with date filters. 

 

The code I have in the Items of the Bar Chart is

 

 

AddColumns(
 GroupBy(
 AddColumns(nocc_outages,
 "_outageMarket", MARKET
 ),
 "Title", "_outageMarket", "_data"
 ),
 "_outageMarketCount", CountRows(_data)
)

 

 

I currently have a Pie Chart and Bar Chart side by side but if I can just have a Bar Chart that groups by Market and then shows Major, Minor, Critical Bars and the count of each 

 

The code for the Pie Chart is 

 

AddColumns(
 GroupBy(
 AddColumns(nocc_outages,
 "_outageType", OUTAGE_TYPE.Value
 ),
 "Title", "_outageType", "_data"
 ),
 "_outageCount", CountRows(_data)
)

 

Visually it all looks like this 

ColarBear_0-1646579940366.png

But what im kind of wanting is this

ColarBear_1-1646580123248.png

Market at the bottom

and 3 bars showing Minor, Major and Critical and count the number of each record.

 

I hope all this makes sense to you and appreciate any help or direction in this. Im new to power apps but mostly self taught trial and error. 

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @ColarBear :

    Do you want to get something like this ?

    vbofengmsft_0-1646791635546.png

    If so ,I've made a test for your reference:

    1\My data source:

    ClearCollect(
     BofTest,
     {Market:"Market1",Outage:"Minor",ID:1},
     {Market:"Market1",Outage:"Minor",ID:2},
     {Market:"Market1",Outage:"Minor",ID:3},
     {Market:"Market1",Outage:"Major",ID:4},
     {Market:"Market1",Outage:"Major",ID:5},
     {Market:"Market1",Outage:"Major",ID:6},
     {Market:"Market1",Outage:"Major",ID:7},
     {Market:"Market1",Outage:"Critical",ID:8},
     {Market:"Market1",Outage:"Critical",ID:9},
     {Market:"Market2",Outage:"Minor",ID:10},
     {Market:"Market2",Outage:"Major",ID:11},
     {Market:"Market2",Outage:"Major",ID:12},
     {Market:"Market2",Outage:"Critical",ID:13},
     {Market:"Market3",Outage:"Minor",ID:14},
     {Market:"Market3",Outage:"Minor",ID:15},
     {Market:"Market3",Outage:"Minor",ID:16},
     {Market:"Market3",Outage:"Major",ID:17},
     {Market:"Market3",Outage:"Critical",ID:18})

    2\Add a blank horizontal gallery and set it's items property to:

    GroupBy(
     AddColumns(
     GroupBy(
     BofTest,
     "Market",
     "Outage",
     "TheGroup"
     ),
     "Count",
     CountRows(TheGroup)
     ),
     "Market",
     "NewGroup"
    )

    vbofengmsft_1-1646791749789.png

    3\Add a column cart into the gallery and set

    vbofengmsft_2-1646791820657.png

    vbofengmsft_3-1646791834904.png

    vbofengmsft_4-1646791852087.png

    Best Regards,

    Bof

  • ColarBear Profile Picture
    28 on at

    That is exactly it thank you very much will implement this now and let you know how it works. Ive been pulling my hair on this one. Thank You

  • zerocool55 Profile Picture
    94 on at

    @v-bofeng-msft 

     

    Can you point me to the right code/ formula if I want to do a similar grouping using a SharePoint list and one of the columns is a choice column? I have 3 markets per region, and I want to group the markets by region, showcasing projects included in each market

     

    Thank you in advance for your help,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard