cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NehaJhade
Frequent Visitor

how to calculate count of rows on the basis of numbered values in columns.

I want to calculate number/count of rows having same values in a particular column names :"Ageing"

Ageing has number type data.

For example: I want to calculate how many rows are in the table has 60  as ageing.

In my table there are suppose 10 rows has ageing column values as 60.

I want count as 10 in my collection or anything.

 

I want to build an column chart on the basis of this.

and Is it possible to have drill down feature in column chart of power apps like we have in power BI column chart.

 

kindly help.

thanks in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Super User
Super User

@NehaJhade 

 

Using AddColumns and Group By

ClearCollect(colAgeData, AddColumns( 
    GroupBy(
        <Your TABLE>,
        "Ageing",
        "AgeInfo"
     ),
    "RowCount",
    CountRows(AgeInfo),
    "NoOfPeopleInAgeGroup",
    Sum(AgeInfo, Ageing)
))

 

Ageing: Your column which contains actual age such as 60.

 

Try this and let me know if you have any issue.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

4 REPLIES 4
JJB
Helper I
Helper I

Would you be able to share a screenshot of your collection?

rsaikrishna
Super User
Super User

@NehaJhade 

 

Using AddColumns and Group By

ClearCollect(colAgeData, AddColumns( 
    GroupBy(
        <Your TABLE>,
        "Ageing",
        "AgeInfo"
     ),
    "RowCount",
    CountRows(AgeInfo),
    "NoOfPeopleInAgeGroup",
    Sum(AgeInfo, Ageing)
))

 

Ageing: Your column which contains actual age such as 60.

 

Try this and let me know if you have any issue.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

Thanks it worked. Many thanks

I have created a visualization using excel attached in below screen shot my requirement is that.

 

I want to display 3 fields on x axis of column chart. i.e RowCount, Assignment Group(AG),Status

So I have modified the collection "ColAgeData" according to requirement.

But These fields(AG, Status) are not coming as expected.

Question: Is this possible which I am trying to do in Power apps chart?

2. How can I add those fields(AG and Status) in chart at a same time. I want all three fields to be visible in chart.(like drill feature)

Any other approach if you can suggest.

Thanks for the help in advance.

 

AgeInfo.PNG

 

collectionAgedata.PNG

 

CollectionAgedata1.PNG

 

Iwant.PNG

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,262)