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

Further Drill Down Filtering

My goal is to be able to display Status="Not Started", Status="In Progress", Status="Dead Deals", etc. based on button click. 

On my Screen my OnVisible property is set to filter already to pull data for my pie chart:

If(!IsEmpty(Filter(Admin_LeadData,FullName=varUser)),
     ClearCollect(colDash_StatusTrack,{Status:"Not Started",Count:CountIf(Lead_Data,Status.Value="Not Started")});
     Collect(colDash_StatusTrack,{Status:"In Progress",Count:CountIf(Lead_Data,Status.Value="In Progress")});
     Collect(colDash_StatusTrack,{Status:"Dead Deal",Count:CountIf(Lead_Data,Status.Value="Dead Deal")});
     Collect(colDash_StatusTrack,{Status:"Completed Deal",Count:CountIf(Lead_Data,Status.Value="Completed Deal")}),
     
     ClearCollect(colDash_StatusTrack,{Status:"Not Started",Count:CountIf(Lead_Data,Status.Value="Not Started"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))});
     Collect(colDash_StatusTrack,{Status:"In Progress",Count:CountIf(Lead_Data,Status.Value="In Progress"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))});
     Collect(colDash_StatusTrack,{Status:"Dead Deal",Count:CountIf(Lead_Data,Status.Value="Dead Deal"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))});
     Collect(colDash_StatusTrack,{Status:"Completed Deal",Count:CountIf(Lead_Data,Status.Value="Completed Deal"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))})
)


My gallery Items property is set to filter my SharePoint list data based on the user logged in. 

If(!IsEmpty(Filter(Admin_LeadData,FullName = varUser)), Lead_Data, 
Filter(Lead_Data, AssignedTo.Value = varUser || LeadMember1.Value = varUser || LeadMember2.Value = varUser || LeadMember3.Value = varUser || LeadMember4.Value = varUser))


What would be my best way to accomplish this without breaking the way my app is working aready? Is it possible? With this in mind I also want to next create a button on my red banner that will sort by the date created. 
Capture.JPG

13 REPLIES 13

Hey @KimberlyM 

 

I didn't realize that you have used incorrect expression to set the variables, please update your expressions as:
Set(SelectedStatus ,"Not Started")
Set(SelectedStatus ,"In Progress")
Set(SelectedStatus ,"Dead Deal")
Set(SelectedStatus ,"Completed Deal")
Set(SelectedStatus ,"All")
 
and this will recognize SelectedStatus  as a valid keyword.
 
Try to use these expressions and in case of any errors, please let us know so that we might be able to help you better.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@yashag2255 

I think I may be confused now and possibly have to many loops going on or something. Here is what I have going on. I have to admit I am so confused right now. Thank you so much for helping. I am so close to finishing this project and was feeling so confident with what I was doing!

This is on my Screen (Dashboard) on the OnVisible property:

If(!IsEmpty(Filter(Admin_LeadData,FullName=varUser)),
    ClearCollect(colDash_StatusTrack,{Status:"Not Started",Count:CountIf(Lead_Data,Status.Value="Not Started")});
    Collect(colDash_StatusTrack,{Status:"In Progress",Count:CountIf(Lead_Data,Status.Value="In Progress")});
    Collect(colDash_StatusTrack,{Status:"Dead Deal",Count:CountIf(Lead_Data,Status.Value="Dead Deal")});
    Collect(colDash_StatusTrack,{Status:"Completed Deal",Count:CountIf(Lead_Data,Status.Value="Completed Deal")}),
     
    ClearCollect(colDash_StatusTrack,{Status:"Not Started",Count:CountIf(Lead_Data,Status.Value="Not Started"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))});
    Collect(colDash_StatusTrack,{Status:"In Progress",Count:CountIf(Lead_Data,Status.Value="In Progress"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))});
    Collect(colDash_StatusTrack,{Status:"Dead Deal",Count:CountIf(Lead_Data,Status.Value="Dead Deal"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))});
    Collect(colDash_StatusTrack,{Status:"Completed Deal",Count:CountIf(Lead_Data,Status.Value="Completed Deal"&&Or(AssignedTo.Value=varUser,LeadMember1.Value=varUser,LeadMember2.Value=varUser,LeadMember3.Value=varUser))})
);

    ClearCollect(colDash_StatusFilter, Filter(Lead_Data,Status.Value="Not Started"));
    Collect(colDash_StatusFilter, Filter(Lead_Data,Status.Value="In Progress"));
    Collect(colDash_StatusFilter, Filter(Lead_Data,Status.Value="Dead Deal"));
    Collect(colDash_StatusFilter, Filter(Lead_Data,Status.Value="Completed Deal"));

    Set(SortByDate,true);
    Set(SelectedStatus ,"Not Started");
    Set(SelectedStatus ,"In Progress");
    Set(SelectedStatus ,"Dead Deal");
    Set(SelectedStatus ,"Completed Deal");
    Set(SelectedStatus ,"All");


On my Gallery (Gallery_Dashboard) Items property: 

If(!IsEmpty(Filter(Admin_LeadData,FullName = varUser)), Lead_Data,
Filter(Lead_Data, (AssignedTo.Value = varUser || LeadMember1.Value = varUser || LeadMember2.Value = varUser || LeadMember3.Value = varUser || LeadMember4.Value = varUser) 
&& (SelectedStatus = TabSelected))
)

//SUGGESTED DOESN"T WORK
//Sort(Filter(If(!IsEmpty(Filter(Admin_LeadData, FullName = varUser)), Lead_Data, Filter(Lead_Data, AssignedTo.Value = varUser || LeadMember1.Value = varUser || LeadMember2.Value = varUser || //LeadMember3.Value = varUser || LeadMember4.Value = varUser)), If(SelectedStatus = "All", true, Status = SelectedStatus)), "Created", If(SortByDate, Ascending, Descending))

//ORIGINAL WORKS
//Sort(If(!IsEmpty(Filter(Admin_LeadData,FullName = varUser)), Lead_Data, Filter(Lead_Data, AssignedTo.Value = varUser || LeadMember1.Value = varUser || LeadMember2.Value = varUser || LeadMember3.Value = varUser || //LeadMember4.Value = varUser)),"createdon",If(SortByDate,Ascending,Descending))

I am getting a delegation warning on && (SelectedStatus = TabSelected)).

On my Not Started Tab Button OnSelect property:

Set(TabSelected, SelectedStatus = "Not Started")


On my InProgress Tab Button OnSelect property:

Set(TabSelected, SelectedStatus = "In Progress")

 

On my Dead Deal Tab Button OnSelect property:

Set(TabSelected, SelectedStatus = "Dead Deal")

 

On my Completed Deal Tab Button OnSelect property:

Set(TabSelected, SelectedStatus = "Completed Deal")

 

On my Show All Tab Button OnSelect property:

Set(TabSelected, SelectedStatus = "All")

 

 

 

Hey @KimberlyM 

 

Please update the configs as:
 
Not Started Tab Button OnSelect property:
Set(.SelectedStatus ,"Not Started")
 
On my InProgress Tab Button OnSelect property:
Set(SelectedStatus, "In Progress")
 
On my Dead Deal Tab Button OnSelect property:
Set(SelectedStatus,"Dead Deal")
 
On my Completed Deal Tab Button OnSelect property:
Set(SelectedStatus,"Completed Deal")
 
On my Show All Tab Button OnSelect property:
Set(SelectedStatus,"All")
 
You can remove all the expressions from OnVisible property.
 
Sort Button: Set(SortByDate,!SortByDate)
 
Gallery Items: Sort(Filter(If(!IsEmpty(Filter(Admin_LeadData,FullName = varUser)), Lead_Data, Filter(Lead_Data, AssignedTo.Value = varUser || LeadMember1.Value = varUser || LeadMember2.Value = varUser || LeadMember3.Value = varUser || LeadMember4.Value = varUser)),If(SelectedStatus = "All", true, Status = SelectedStatus)),"createdon",If(SortByDate,Ascending,Descending))
 
Please remove all the other expressions.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

@yashag2255 and @cwebb365  thank you so much for helping me! I have been successful! Your time and effort is so greatly appreciated!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,563)