Hello,
How can I filter multiple things at the same time? I have an excel table and would like to filter the data for the logged in user and count how many sick leaves did the user take.
My code is: Set(getTotalSickLeaveForLoggedinUser,CountRows(Filter(Table1, User().Email = 'Created By')));
This code gets the total number of leaves for each user
CountRows(Filter(Table1, 'Leave Type'= "Sick Leave"))), and this gets the total sick leaves.
So how i cant i add both codes together in order to filter the sick leaves for each user
Thanks.
Solved! Go to Solution.
Hi @sr12 ,
By using '&&' and function.
Set(getTotalSickLeaveForLoggedinUser,CountRows(Filter(Table1, User().Email = 'Created By' && YourLeaveTypeColumn="Sick leave")));
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @sr12 ,
Try this - you will have to add the column name and value to match
Set(
getTotalSickLeaveForLoggedinUser,
CountRows(
Filter(
Table1,
'Created By'.Email = User().Email &&
LeaveTypeColumn = "Sick"
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @sr12 ,
By using '&&' and function.
Set(getTotalSickLeaveForLoggedinUser,CountRows(Filter(Table1, User().Email = 'Created By' && YourLeaveTypeColumn="Sick leave")));
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @sr12 ,
Try this - you will have to add the column name and value to match
Set(
getTotalSickLeaveForLoggedinUser,
CountRows(
Filter(
Table1,
'Created By'.Email = User().Email &&
LeaveTypeColumn = "Sick"
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
How can I show the variable value, which is the sick leave balance for example?
Hey @sr12 - Set the text property of label as 'getTotalSickLeaveForLoggedinUser' to show it in the screen.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
166 | |
94 | |
64 | |
63 | |
60 |
User | Count |
---|---|
238 | |
162 | |
95 | |
85 | |
81 |