After stumbling into this post, I decide to try integrating it to my app so user can filter data based on criteria they specified. I want the user to specify a start date, end date and the system has there user email. With this criteria filter the table "Expenses" to see which points fit that criteria. But I cant seem to make the formula work. This is what I have so far:
FILTER("Expenses",
AND(
OR( ISBLANK([_THISROW].[Employee ID Input]) , CONTAINS (Expenses[Employee ID],[_THISROW].[Employee ID Input])),
OR( ISBLANK([_THISROW].[Start Date]) , [Date] >= [_THISROW].[Start Date] ),
OR( ISBLANK([_THISROW].[End Date]) , [Date] <= [_THISROW].[End Date] )
)
)
While it does filter correctly for start and end date, it doesn't filter for Email.
As you can see the email says Amanda but I'm Gabriel. Any help to make this work by filtering the email correctly will be appreciated.
Solved! Go to Solution.
If you want to filter with the app user, would that part be then just as simple as..
[Employee ID]=USEREMAIL()?
Your syntax with the CONTAINS() doesn't make sense. Write it with the IN() something like..
IN([_THISROW],[Employee ID Input],Expenses[Employee ID])
I have already tried IN() and it didn't work, just tried it again with the formula you gave and it just filters the date like the formula using CONTAINS().
FILTER("Expenses",
AND(
OR( ISBLANK([_THISROW].[Employee ID Input]) , IN([_THISROW].[Employee ID Input],Expenses[Employee ID])),
OR( ISBLANK([_THISROW].[Start Date]) , [Date] >= [_THISROW].[Start Date] ),
OR( ISBLANK([_THISROW].[End Date]) , [Date] <= [_THISROW].[End Date] )
)
)
I don't know why it isn't working the behavior is exactly the same as said before.
So.. do you want to use your input table just for the filtering with start and end dates?
Yes, I am using a table called "request" that documents all the requests of employees for there expense report right now I just want them to be able to see the results of the filter before I send out the email. I also tried doing USEREMAIL() instead of :
[_THISROW].[Employee ID Input]
But it didn't work.
If you want to filter with the app user, would that part be then just as simple as..
[Employee ID]=USEREMAIL()?
I tried it before but added the name of the table before the column and because it was a list it didn't let me compare it. I just had to take the table out.
Thank you for your help! Appreciate it!
You're welcome!
User | Count |
---|---|
17 | |
12 | |
9 | |
4 | |
4 |