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

How do I Filter Lead Gallery from Distinct Gallery - Data is Dynamics 365 Leads

I am new to creating canvas apps and I used DataVerse > Leads to test out a way to create a simple Canvas app used to handle Leads. I am filtering the status field from the Lead entity


This is all based on trying to replicate the Service Desk Example that uses Collections vs. a DataVerse > Leads Table. I want to replicate this against the Lead Table in DataVerse. This helps explain how it works in the Service Desk example template.


Here is my functional Items formula and in the following screen shots. Distinct(Leads.'Status Reason','Status Reason')


I want to click on the > ICON for each Distinct status Reason and have that filter out that STATUS on the below screen. 



I want this screen filtered out based on the selection from the above screen.


The icon for the HomePage Screen in the service desk example has this code:



If(ThisItem.TicketTypes="All tickets",
If(ThisItem.TicketTypes="New tickets",
If(ThisItem.TicketTypes="Tickets in progress",
    Navigate(TicketsPage,ScreenTransition.Fade,{type:"In progress"}),
If(ThisItem.TicketTypes="Tickets closed",
If(ThisItem.TicketTypes="Tickets on hold",
    Navigate(TicketsPage,ScreenTransition.Fade,{type:"On hold"}))))));
If(ThisItem.TicketTypes="Tickets older than 3 days",
    Navigate(TicketsPage,ScreenTransition.Fade,{datetype:Text(DateAdd(DateValue(Text(Today()), "en"), -3)),type:"Tickets older than 3 days"}),
If(ThisItem.TicketTypes="Tickets closed today",
    Navigate(TicketsPage,ScreenTransition.Fade,{datetype:Text(DateAdd(DateValue(Text(Today()), "en"), 0)),type:"Tickets closed today"}),
If(ThisItem.TicketTypes="Tickets opened today",
    Navigate(TicketsPage,ScreenTransition.Fade,{datetype:Text(DateAdd(DateValue(Text(Today()), "en"), 0)),type:"Tickets opened today"}))))


I tried the following adjustment to the Service Desk Example I wrote about above. I cannot get to work on the tickets page:



    Filter(Leads,   createdon <> 'Status Reason' && createdon <>Text(DateValue(Text(Today()), "en")), createdon <> Text(DateAdd(DateValue(Text(Today()), "en"), -2)),createdon <> Text(DateAdd(DateValue(Text(Today()), "en"), -1))|| 'Est. Close Date' <> 'Status Reason' && 'Est. Close Date' <> Text(Today()), 'Est. Close Date' <> Text(DateAdd(DateValue(Text(Today()), "en"), -2)),'Est. Close Date' <> Text(DateAdd(DateValue(Text(Today()), "en"), -1))),
If(type="New",Filter(Leads,'Status Reason' in 'Created On'),
If(type="Canceled",Filter(Leads,'Status Reason' in 'Est. Close Date'),Filter(Leads,type in Status)))))


 I appreciate your help, I am new to this and lost so thanks! I hope I have written enough to get some assistance, thanks!

New Member

Anyone have any ideas? even another solutution?

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,722)