cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Combining Filter, GroupBy and AddCoulmn

Hi

 

I have looked through this site but can not solve this issue. 

 

I have a data table which i am filtering using this - Filter(Skills_Matrix_List_for_app,User().FullName<>Author) - which works fine

 

I then have a chart where I use this - AddColumns(
GroupBy(Skills_Matrix_List_for_app,"Skill_x0020_SLT", "SkillsA"), "Count", CountRows(SkillsA))

 

But i want to also filter the chart, but when i add the filter to the the chart it doesn't work 

 

Filter(AddColumns(
GroupBy(Skills_Matrix_List_for_app,"Skill_x0020_SLT", "SkillsA"), "Count", CountRows(SkillsA)), User().FullName<>Author

 

Can anyone help? 

2 REPLIES 2
Power Apps
Power Apps

Try filtering the data first, and then using the result of the filter as the input to the GroupBy function:

AddColumns(
    GroupBy(
        Filter(
            Skills_Matrix_List_for_app,
            User().FullName <> Author),
        "Skill_x0020_SLT",
        "SkillsA"),
    "Count",
    CountRows(SkillsA))

Hi

 

in case anyone comes across this question - i did figure it out in the end

 

AddColumns(
 GroupBy(Filter(Skills_Matrix_List_for_app,User().FullName = Author.DisplayName),"Skill_x0020_SLT", "SkillsA"), "Count", CountRows(SkillsA))

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (25,993)