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 / Further advance filter...
Power Apps
Answered

Further advance filtering on Charts

(0) ShareShare
ReportReport
Posted on by

Dear @PowerAddict 

 

Based on your and others wonderful support I made the following, 

 

  1. Collection to find sales by location
  2. Collection to summarize the sales by location
  3. Chart to show the summary sales by location 

Capture.PNG

 

I want the location chart to filter based on the Year selection in the dropdown. In the location summary the SalesYear column has under the group. I tried following way but did not work

 

If(Dropdown2_1.Selected.Value="All",SalesSumbyLocation,Filter(SalesSumbyLocation, Grouped.SalesYear = Text(Dropdown2_1.Selected.Value)))
 
It says under the = sign invalid argument type 
 
Annotation 2019-11-30 055714.jpg

 

Kindly help

 

Osmand

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    What happens when you try without the Text function?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://thepoweraddict.com
  • OsmandFernando Profile Picture
    on at

    @PowerAddict  same error brother, invalid argument type 

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Ok. Two questions:

    1. Show me your SalesSumByLocation collection by going to View->Collections

    2. Show me the items property of Dropdown2_1

    Thanks,
    Hardit
  • OsmandFernando Profile Picture
    on at

    @PowerAddict 

     

    There you go

     

    1. 

    Capture.PNGCapture1.PNG

     

    2.  Item property set as 

    ["All","2019","2020"]
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Ok so the problem is that your year numbers are in decimal format. You need to first change them to numbers without decimals.

    Try something like:

    Left(Find(Grouped.SalesYear), ".") instead of Grouped.Sales in your filter expression.

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://thepoweraddict.com
  • OsmandFernando Profile Picture
    on at

    Thank you @PowerAddict  I tried but did not work

     

    If(Dropdown2_1.Selected.Value="All",SalesSumbyLocation,Filter(SalesSumbyLocation, Left(Find(Grouped.SalesYear),".") = Text(Dropdown2_1.Selected.Value)))
     
    I think left function is not complete. Also I tried as below, 
     
    If(Dropdown2_1.Selected.Value="All",SalesSumbyLocation,Filter(SalesSumbyLocation, Left(Find(Grouped.SalesYear),".",4) = Text(Dropdown2_1.Selected.Value)))
     
    Did not work
     
    Osmand
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    My bad, yes the Left function was incorrect. Try this: 

     

    If(Dropdown2_1.Selected.Value="All",SalesSumbyLocation,Filter(SalesSumbyLocationLeft(Grouped.SalesYear, Find(Grouped.SalesYear,".")) = Text(Dropdown2_1.Selected.Value)))

     

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://www.thepoweraddict.com

  • OsmandFernando Profile Picture
    on at

    Thank you @PowerAddict 

     

    But still the = sign says Invalid argument type

     

     
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Do me a favor please. On either side of the equation, if you keep your cursor, it should tell you the data type. Let me know what those are.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://thepoweraddict.com
  • OsmandFernando Profile Picture
    on at

    @PowerAddict 

     

    It is Control

     

    Annotation 2019-11-30 133253.jpg

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

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard