Hi, I have a slicebased on user input.
I have 4 columns in a table named "user assign details"as below
|Unique Id| User Id| Next Call| Counties To Include|
1 |phil@listersbrewery.com| 22/10/2019| West Sussex|
2 bob@listersbrewery.com 15/11/2019 East sussex
Expression is as below where the main table is checked for rows with columns that match User Id, Next Call and Counties to Include.
AND(CONTAINS(User Assign Details[Counties To Include],[County]),CONTAINS(User Assign Details[Next Call],[Next Call],))
I would like also like to specify which row in the slice by Unique Id to check against so that I can assign a slice to each row and therefore user.
Thanks
Phil
Solved! Go to Solution.
Got It!
AND( IN( [County], SELECT( User Assign Details[Counties To Include], [Unique Id] =โ1โ ) ),
IN( [Next Call], SELECT( User Assign Details[Next Call], [Unique Id] =โ1โ ) ))
Thanks Guys
Phil
I think this needs a little more elaboration to help us understand what you are trying to achieve.
Hi,
There are are two tables. The main table โFull List Tableโ holds rows with outlets/pubs.
The second โUser Assign Detailsโ has inputs by the user in columns User Id, Next Call and Counties To Include. A slice is based on those inputs to return outlets ithat are in the โcountyโ selected with โnext callโ column matching the date entered.
Currently the expression in the post above shows this as the description
ALL these statements are true:
โฆ1: (USER ASSIGN DETAILS[Counties To Include]) contains the text value (The value of column โCountyโ)
โฆ2: (USER ASSIGN DETAILS[Next Call]) contains the text value (The value of column โNext Callโ)
which works fine except that outlets that are in West Sussex and East Sussex and have a next call on 22/10/2019 and 15/11/2019 are returned. The expression has filtered the rows in the main Full List Table by both rows in the User Assign Details table.
I would like to specify which row in the User Assign Table to look up against to only return outlets that match criteria in the row in the table with Unique Id โ1โ - outlets in West Sussex with next call due on 22/10/2019.
That would result in something like below:
ALL these statements are true:
โฆ1: (USER ASSIGN DETAILS[Counties To Include])from the row that contains Unique Id โ1โ contains the text value (The value of column โCountyโ)
โฆ2: (USER ASSIGN DETAILS[Next Call])from the row that contains Unique Id โ1โ contains the text value (The value of column โNext Callโ)
This is a version of the โSlice Based On User Inputโ demo app.
I hope this helps
Many thanks
Phil
Try:
AND(
IN(
[County],
SELECT(
User Assign Details[Counties To Include],
(USEREMAIL() = [User Id])
)
),
IN(
[Next Call],
SELECT(
User Assign Details[Next Call],
(USEREMAIL() = [User Id])
)
)
)
Hi thanks Steve,
Nearly there. The user Id if just for reference. I just want to use Unique Id = โ1โ as the row reference.
So the description would read something like this
ALL these statements are true:
โฆ1: (The value of column โCountyโ) is one of the values in the list (The list of values of column โCounties To Includeโ
โฆfrom rows of table โUSER ASSIGN DETAILSโ
โฆwhere this condition is true: Unique Id = โ1โ
โฆ2: (The value of column โNext Callโ) is one of the values in the list (The list of values of column โNext Callโ
โฆfrom rows of table โUSER ASSIGN DETAILSโ
โฆwhere this condition is true: Unique Id = โ1โ
thanks
Phil
Got It!
AND( IN( [County], SELECT( User Assign Details[Counties To Include], [Unique Id] =โ1โ ) ),
IN( [Next Call], SELECT( User Assign Details[Next Call], [Unique Id] =โ1โ ) ))
Thanks Guys
Phil
Hi Steve,
The expression works but only with single values in the โcounties to includeโ and โnext callโ. I have multiple counties and dates selected from enumlists in the input part.
Can you help me with a โCONTAINSโ expression please where "User Assign Details[Counties to Include] CONTAINS [County]
The desciption of the expression (below) with IN suggests that it would do this but it is not returning a Yes/No unless there are single values on the input cells for example โAberdeenshireโ vs โAberdeenshire, Angusโ
1: (The value of column โCountyโ) is one of the values in the list (The list of values of column โCounties To Includeโ
โฆfrom rows of table โUSER ASSIGN DETAILSโ
โฆwhere this condition is true: ((The value of column โUnique Idโ) is equal to (โ1โ)))
โฆ2: (The value of column โNext Callโ) is one of the values in the list (The list of values of column โNext Callโ
โฆfrom rows of table โUSER ASSIGN DETAILSโ
โฆwhere this condition is true: ((The value of column โUnique Idโ) is equal to (โ1โ)))
Many thanks
Phil
In the User Assign Details table, Counties To Include is plural, implying it contains a list of values, and Next Call is singular, implying it contains only a single value. In the Full List Table table, County is singular implying it contains only a single value; likewise for Next Call.
The expression I provided should accommodate my interpretation.
How have I misinterpreted your needs?
Hi Steve,
No, youโve understood pefectly. The expression work fine I realised but the Next Call element was stopping it from working. For some reason the date element doesnโt work as though somthing isnโt formatted correctly somewhere and so dates that should match arenโt.
Many thanks
Phil
Please provide screenshots of the Next Call column configurations from the two tables.
User | Count |
---|---|
41 | |
36 | |
28 | |
23 | |
16 |