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 Apps
Answered

Bar Chart

(0) ShareShare
ReportReport
Posted on by 28

ColarBear_0-1646337656498.png

 

I have a Sharepoint List that I want to create a Bar Chart off of to list how many events happen each day weekly report. Part of my problem is that when I add the Bar Chart it has "field_8" etc instead of the column names but also I am trying to figure out how to count all the rows by "Market" and Count all the Rows by "Outage_Type", Kind of like a outage report weekly like these were down this week.  

 

Outage Type // Choice Column (Minor, Major, Critical)

Market // Text Field that we put in data

We just go off of the default Created/Modified Field in Sharepoint for Date/Time.

 

Categories:
I have the same question (0)
  • ColarBear Profile Picture
    28 on at

    Sharepoint List name is 'nocc_outages' columns we need to report is Outage Type and Market

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ColarBear 

    You will need to know the real names of your columns.  Most likely you have imported your data from excel into SharePoint.  

    When you create a list from Excel it will not use the column names from your Excel as the column names in SharePoint, it will generate its own column names (initially).

     

    Once a column is named, it can never be renamed.  That is, the "real" name of the column can never be renamed.  You can rename in SharePoint, but it is "visual" only.  The Real name will not change.

    PowerApps works with the Real names for controls like the charts.

     

    The only way to resolve is to build another list and create your columns and name them all manually.  Then you can copy your data over from the other and use the new list for your PowerApps.

     

    So, if you stick with the list you have, then you will need to look at the real names of the columns to know which is which.  To determine a column's real name, you can click on the column in the List Settings of your list and then in the address bar of your browser, look at the end of the URL - it will show the real name.

     

    As for your Items property of the chart, you will want something more like this:

    AddColumns(
     GroupBy(
     AddColumns(yourDataSource,
     "_outageType", Outage_Type.Value
     ),
     "Market", "_outageType", "_data"
     ),
     "_outageCount", CountRows(_data)
    )

     

    Now, the above is a general formula (and again, the field names in the above need to be replaced with the Real names), but I am not entirely sure what you are trying to count and how you are trying to display the data.

    The above will provide a set of Market and Outage Type records with a count as to the number of records associated with those records.

     

    I hope this is helpful for you.

  • ColarBear Profile Picture
    28 on at

    That makes a whole lot of sense i think I did import this one into sharepoint. Thanks for the info you made my day easier. Thank You.....

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ColarBear 

    Happy to help!

  • ColarBear Profile Picture
    28 on at

    Would you add another series in the same way. I would like two series one for MARKET and one for OUTAGE_TYPE. I tried the following 

     

    AddColumns(
     GroupBy(
     AddColumns(Gallery2.AllItems,
     "_outageType", OUTAGE_TYPE.Value,
     "_outageMarket", MARKET
     ),
     "Title", "_outageType", "_data",
     "MARKET", "_outageMarket", "_datamarket"
     ),
     "_outageCount", CountRows(_data)
     "_outageMarket", CountRows(_datamarket)
    )

    with no avail im sure I am doing it wrong but what i was hoping for is two columns side by side. I did recreate the sheet as well like you said and then after I found again where to grab the fields from on the EditForm. 

     

    ColarBear_0-1646430235292.png

     

  • ColarBear Profile Picture
    28 on at

    I did put a comma between these as well

    "_outageCount", CountRows(_data) <-------Inserted Comma
    "_outageMarket", CountRows(_datamarket)
  • ColarBear Profile Picture
    28 on at

    We basically have a sheet that we fill in outage information and there is a choice column for type of outage and a dropdown fills in the value of the market based off a excel sheet. So the Market is just a text field. I want to see if we can have a bar chart that will display how many outages we have by market and what type of outage by market. It goes off a Gallery that I filter with a date range.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard