cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Re: Further advance filtering on Charts

@PowerAddict 

 

It is Control

 

Annotation 2019-11-30 133253.jpg

Highlighted
Super User
Super User

Re: Further advance filtering on Charts

Keep your cursor at the points I have marked below:

 

Annotation 2019-11-30 133253.jpg

 

---
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

Highlighted
Post Prodigy
Post Prodigy

Re: Further advance filtering on Charts

@PowerAddict  I did as you guided. but either side does not show anything related to data type

 

Annotation 2019-11-30 133253.jpg

Super User
Super User

Re: Further advance filtering on Charts

Hi,

 

We need to compare numbers with numbers, and your items in the dropdown are set to text, so could you try this:

 

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

Could you try that and let me know if that works?

 

Thanks,

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Highlighted
Community Support
Community Support

Re: Further advance filtering on Charts

Hi @OsmandFernando ,

 

What is the data type of SalesYear column?

I almost agree with ManCat's thought. The error shows invalid argument type , that is because the left part of equal is number, but the right part is text. So please try this code:

 

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

Best regards,

Sik

Highlighted
Post Prodigy
Post Prodigy

Re: Further advance filtering on Charts

@iAm_ManCat @v-siky-msft  I tried both solutions still = sign in red says Invalid Argument type

 

@PowerAddict  any idea?

 

Osmand

Highlighted
Super User
Super User

Re: Further advance filtering on Charts

I'm thinking that because you have an "ALL" value, it won't be able to convert every item to Value, so could you try this:

 

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

 

Thanks!

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Highlighted
Post Prodigy
Post Prodigy

Re: Further advance filtering on Charts

@iAm_ManCat tried and following is the result

 

Annotation 2019-12-03 210330.jpg

Highlighted
Super User
Super User

Re: Further advance filtering on Charts

Ok, right, now I see, this is because you have multiple rows in each Grouped.SalesYear, so it's a list of entries rather than one item, so we can't compare a box of Apples with an Apple (if that makes sense?)

 

Could you try these two different formulae? I'm not actually 100% sure these will work, as I think the issue is that it's not able to compare multiple sub-items to a singular parent item.

 

If(
   Dropdown2_1.Selected.Value="All",
      SalesSumbyLocation,
   Filter(SalesSumbyLocationDropdown2_1.Selected.Value in Text(Grouped.SalesYear.Value, "YYYY"))
)

 

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

 

 

Another way of solving this would be to create a new collection, which has the parent (SalesBySumLocation) ID as a new column maybe called RowID, and the contents of Grouped.SalesYear, using AddColumns and ClearCollect, and then filtering That to then show only those items where the Year matches, then comparing your original to this filtered list where the ID's and RowID's match.


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Further advance filtering on Charts

hi @iAm_ManCat thank you so much for opening my eyes, I did small change to the collection, to add the SalesYear as a column, then applied your formula, it worked, yesssssss

 

Capture.PNG

 

Osmand. 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,237)