cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highwaywoman
Helper I
Helper I

Add Columns - Add Multiple Columns that are grouped Formula

Hello, 

 

I have SharePoint list with a few date columns (Date Reported, Date Approved and Date Closed ) .

I want to group the columns by month and show the amount of items for that month.

I was able to group one successfully and show it as a line in the graph but i want to show the other data points as overlaying lines/series. So ultimately I want to add other columns into this formula just not sure how to...thank you for your help! 

 

Here is the formula i am using on the chart and in the picture

ITEMS=AddColumns(
GroupBy(
AddColumns(
Chart_RFC_Export,
"MonthName",
Text(
'Date Reported',
"[$-en-US]mmmm"
)
),
"MonthName",
"Grouped"
),

"Count",
CountRows(Grouped)
)

 

4 REPLIES 4
Highwaywoman
Helper I
Helper I

Highwaywoman_0-1659722836181.png

 

WarrenBelz
Super User
Super User

HI @Highwaywoman ,

As below, but realise you can only add one of the grouped records per line - you can also use Last() if you want to

AddColumns(
   GroupBy(
      AddColumns(
         Chart_RFC_Export,
         "MonthName",
         Text(
            'Date Reported',
            "[$-en-US]mmmm"
         )
      ),
      "MonthName",
      "Grouped"
   ),
   "Count",
   CountRows(Grouped),
   "DateApproved",
   First(Grouped).'Date Approved',
   "DateClosed",
   First(Grouped).'Date Closed'
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

@WarrenBelz thank you for your reply! I feel like it's almost there- i hope you can help me tweak a bit? I attached a picture. I updated the formula with how you told me to (changed the names but now i see them as series options. SO Thank YOU)

1) How do I get multiple lines (a line per series) to show on the same graph? (if possible) They have different count of items per month so they shouldn't be all on top of each other like in the image.

2) do you know why the dates are wonky? they are all the same year, so thats odd.

 

aformula1.PNG

 formula here, too :

AddColumns(
GroupBy(
AddColumns(
eRHA,
"MonthName",
Text(
'Date Forwarded',
"[$-en-US]mmmm"
)
),
"MonthName",
"Grouped"
),
"Count of Date Forwarded Per Month",
CountRows(Grouped),
"Count HRB Receives eRHA per month",
First(Grouped).'Date HRB Receives eRHA',
"Count Commander Approved per month",
First(Grouped).'Date Commander Approved'
)

 

thanks in advance! im so close :3

Hi @Highwaywoman ,

Sorry, I do not use the graph feature in Power Apps (we use Power BI for that), so I cannot answer question 1 in any depth. Question 2 - one of the many reasons I do not use the "wonky" interface - I also found it difficult to display dates (amongst other things).

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,096)