Hi,
I have a table JOBS. It has kind of jobs.
Employees use this table to create rows in another table PROGRAM
The table JOB:
ID
POSITION OF EMPLOYEE (like gardener, officer etc.)
FREQUENCY (it has the enum list DAILY, WEEKLY, TWICE A WEEK, MONTHLY)
The table PROGRAM:
ID
DATE
JOB (connecting with the ID's of table JOB)
POSITION OF EMPLOYEE (copy from the table JOB)
FREQUENCY (copy from the table JOB)
TIME
PLACE
I want to select only the rows from the table JOB that have two rows (at least) with the frequency twice a week, in the current week in the table PROGRAM
I have a formula:
SELECT(PROGRAM[JOB], AND([JOB]=[JOB].[ID], [FREQUENCY]="TWICE A WEEK", WEEKNUM(TODAY())=WEEKNUM([DATE])))
But with this formula I have all the rows with frequency "twice a week" in current week but I can't see the rows that are double in the same week
How I could filter the rows having the jobs that thew have done twice a week in the current week?
Thank you
Sakis
Solved! Go to Solution.
Thank you , please try the below expression. I think a few parentheses were incorrect in your expression.
Hope you re trying it as a row filter for example in a slice filter
ISNOTBLANK(
FILTER(
"ฮ ฮกฮฮฮกฮฮฮฮ",
AND([_THISROW].[ฮฮกฮฮฮฃฮฮ]=[ฮฮกฮฮฮฃฮฮ], [ฮฃฮฅฮงฮฮฮคฮฮคฮ]="5.ฮฮฮฮฮฮฮฮฮฮฮฮฮ", WEEKNUM(TODAY())=WEEKNUM([ฮฮฮฮกฮฮฮฮฮฮ]) )
)
- LIST([_THISROW])
)
If understanding of your requirement is correct, your rows filter expression could be
ISNOTBLANK(
FILTER(
"PROGRAM",
AND([_THISROW].[JOB] = [JOB], [FREQUENCY]="TWICE A WEEK", WEEKNUM(TODAY())=WEEKNUM([DATE] ))
)
- LIST([_THISROW])
)
Thanks for the answer but I don't understand the [_THIS] = [JOB],. What is [_THIS}.
I have the error message "Unable to find column '_THIS', did you mean 'ID'?"
There was a typo. Please check, I have updated the expression.
Sorry but I have error
"Arithmetic expression '(AND(([_THISROW]........has inputs of an invalid type 'Unknown'"
Could you share screenshot of the expression with the error in expression assistant?
Edit: I think there was a parenthesis missing in the expression. Could you try the revised expression?
ISNOTBLANK(
FILTER(
"PROGRAM",
AND([_THISROW].[JOB] = [JOB], [FREQUENCY]="TWICE A WEEK", WEEKNUM(TODAY())=WEEKNUM([DATE] ))
)
- LIST([_THISROW])
)
You couldn't understand because the name of the fields and the tables are in Greek. I have translated them in English to understand the problem.
But all the others are the same.
Your expression in my case is:
ISNOTBLANK(
FILTER(
"ฮ ฮกฮฮฮกฮฮฮฮ",
AND([_THISROW].[ฮฮกฮฮฮฃฮฮ]=[ฮฮกฮฮฮฃฮฮ], [ฮฃฮฅฮงฮฮฮคฮฮคฮ]="5.ฮฮฮฮฮฮฮฮฮฮฮฮฮ", WEEKNUM(TODAY())=WEEKNUM([ฮฮฮฮกฮฮฮฮฮฮ])
)
- LIST([_THISROW])
))
and the message error is
Arithmetic expression '(AND(([_THISROW].[ฮฮกฮฮฮฃฮฮ] = [ฮฮกฮฮฮฃฮฮ]), ([ฮฃฮฅฮงฮฮฮคฮฮคฮ] = "5.ฮฮฮฮฮฮฮฮฮฮฮฮฮ"), (WEEKNUM(TODAY()) = WEEKNUM([ฮฮฮฮกฮฮฮฮฮฮ])))-LIST([_THISROW]))' has inputs of an invalid type 'Unknown'
Thank you , please try the below expression. I think a few parentheses were incorrect in your expression.
Hope you re trying it as a row filter for example in a slice filter
ISNOTBLANK(
FILTER(
"ฮ ฮกฮฮฮกฮฮฮฮ",
AND([_THISROW].[ฮฮกฮฮฮฃฮฮ]=[ฮฮกฮฮฮฃฮฮ], [ฮฃฮฅฮงฮฮฮคฮฮคฮ]="5.ฮฮฮฮฮฮฮฮฮฮฮฮฮ", WEEKNUM(TODAY())=WEEKNUM([ฮฮฮฮกฮฮฮฮฮฮ]) )
)
- LIST([_THISROW])
)
Thank you @Suvrutt_Gurjar ๐
I have used this to a slice and I have the solution to filter the data.
User | Count |
---|---|
14 | |
11 | |
9 | |
7 | |
4 |