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 / Creating a pivot table...
Power Apps
Answered

Creating a pivot table within the app

(0) ShareShare
ReportReport
Posted on by 17

Hi,

 

I am trying to create an app from a Sharepoint custom list. I want to create a simple column chart that says:

We have n1 number of records of category y1, n2 number of records of category y2 and n3 number of records of category y3.

 

Basically summarizing a long table in a "pivot table", so then I can create a column chart.

 

How can I do this?

 

Thanks!

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

    Hi @Wichowich ,

     

    You can show data in a line, pie, or bar chart in PowerApps, learn how to do this here:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/use-line-pie-bar-chart

     

    Regards,

    Mona

  • Wichowich Profile Picture
    17 on at

    Hi @v-monli-msft!

    Thanks for the answer, unfortunately, this is not what I am looking for.

     

    In Excel analogy, my data is raw, so I have many rows with the category name. Pie charts and bar charts cannot be applied to this data without consolidation or summary, which you accomplish with Pivots.

     

    Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Wichowich have you seen the follwoing blog post? 

     

    https://eriksvensen.wordpress.com/category/pivottable-2/ 

     

    It may help you acheive your needs. 

     

    @Anonymous 

  • greggdavenport Profile Picture
    57 on at
    Here’s an idea: Use Distinct() on the table you want to pivot, naming the field whose values you want to turn into column names. Then set up a horizontal gallery with the Distinct expressions Result table as the data source. Inside the gallery, nest a second gallery - this time a vertical one - with the items property set to a filter on the original data source on the value that matches the corresponding horizontal gallery’s value. I hope this makes sense!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Having the same issue. 

     

    What I am trying to do is to embed a Power BI tile and display pivot table in Power BI.

     

    The thing is Power BI is not refreshed in real time, user might struggling see how they have to wait for half hour for the data to be displayed

  • Stemmons_PowerU Profile Picture
    15 on at

    Hi, 

     

    One way we've overcome refresh issues for our PowerBi tiles within PowerApps is adding a button that utilizes a powerautomate flow to refresh data. 

    https://youtu.be/7vCD8Zu686Q << is a video on how to setup a button using a Post Request > API within PowerBi, but the same function can be added to a button in PowerApps.  

    Hope this helps, 

     

    Andrew

  • semfred Profile Picture
    2 on at

    Hi did you resolve this? Thank you please share your solution.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sadly, no

  • Verified answer
    danderson2692 Profile Picture
    55 on at

    I was able to make this work by following the approach listed in this thread: https://powerusers.microsoft.com/t5/Building-Power-Apps/Access-Parent-s-Gallery-Item-in-a-Nested-Gallery/m-p/318469

     

    In my case since I used the Distinct() approach that gdavenport recommended, it was awkward to create an ID field so instead I used the headers of both nested galleries to derive a value using the labels. In other words:

    1. I had a vertical gallery which gave me discrete Category rows using Distinct(etcUnpivot,Category) where etcUnpivot was my table
    2. I had a nested horizontal gallery which gave me discrete Date columns using Distinct(etcUnpivot,Date)
    3. To show the values, I used a label with LookUp(etcUnpivot,Category=Label5.Text && Date=Label8.Text,Value) where Label5 was my row label in the vertical gallery, Label8 was my column label in the horizontal gallery, and "Value" is the value I wanted to present in the pivot table.

    This was the result which is good enough for my situation. I'm not sure if it would be possible to prevent headers from being repeated on each row or to make it so a single horizontal scrollbar can scroll for all rows:

    Capture.PNG

     

    This worked for me using both a collection and a sharepoint list as a data source.

  • Fcalle Profile Picture
    2 on at

    Hi, everyone.

    It's a very interesting solution. It runs perfect.

    I have a new challenge: how to create this solution for a table (to export).

    Any solution?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard