Hello,
Trying to create a slice that is filtered based on latest date. Example given below where the golfer with the latest date is returned (i.e. ID 3 is removed from the slice)
Data
ID | GolferID | Type | Hcap | Date |
---|---|---|---|---|
1 | 1 | GUI | 16 | 29/06/2020 |
2 | 2 | GUI | 12 | 29/06/2020 |
3 | 3 | GUI | 18 | 29/06/2020 |
4 | 3 | GUI | 17 | 16/07/2020 |
Slice
ID | GolferID | Type | Hcap | Date |
---|---|---|---|---|
1 | 1 | GUI | 16 | 29/06/2020 |
2 | 2 | GUI | 12 | 29/06/2020 |
4 | 3 | GUI | 17 | 16/07/2020 |
Thanks for any help,
Pat
Solved! Go to Solution.
For a slice, the expression is something like:
[_ROWNUMBER] =
MAX(
SELECT(
HcapGUI[_ROWNUMBER],
([GolferID] = [_THISROW].[GolferID])
)
)
to get the Yes/No expected type.
Thanks Steve, tried a few examples to get this to work but failing miserably
LOOKUP( MAX( SELECT( HcapGUI[_ROWNUMBER], ([_THISROW].[Date] = [Date]) ) ), โHcapGUIโ, โ_ROWNUMBERโ, โHcapIDโ )
The expression is valid but its result type โRefโ is not one of the expected types: Yes/No
If I wasnโt clear, Iโm trying to get multiple rows returned not just one row.
For a slice, the expression is something like:
[_ROWNUMBER] =
MAX(
SELECT(
HcapGUI[_ROWNUMBER],
([GolferID] = [_THISROW].[GolferID])
)
)
to get the Yes/No expected type.
Thank you very much. Worked first time
User | Count |
---|---|
43 | |
26 | |
23 | |
14 | |
11 |