Forum Discussion
AllanBerces
9 months agoPost Prodigy
Containsstring and Count
Hi good day
Can anyone help me on my calculated column, i have two table that connected. I want to count the number of Job.
DESIRED OUTPUT
Table Connection
JC Count =
CALCULATE(
COUNTROWS(MAIN_DATA),
FILTER(
'MAIN_DATA',
(CONTAINSSTRING('MAIN_DATA'[Job No.], "LP") || CONTAINSSTRING('MAIN_DATA'[Job No.], "LS") || CONTAINSSTRING('MAIN_DATA'[Job No.], "LI") || CONTAINSSTRING('MAIN_DATA'[Job No.], "LM"))
&&
NOT CONTAINSSTRING('MAIN_DATA'[Job No.], "QF")
&&
NOT CONTAINSSTRING('MAIN_DATA'[TQ], "SQ")
)
)
Thank you
Sorry, I optimized the code.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
17 Replies
- AhmedxSuper User
попробуй удалить ALL
L Count = VAR _KewSearch= SELECTCOLUMNS( {"LS","LP"},"KeyWord",[Value]) VAR _Result = COUNTROWS(FILTER('MAIN_DATA TABLE','MAIN_DATA TABLE'[Code] in _KewSearch)) RETURN _Result- AhmedxSuper User
pls try
Q Count = VAR _KewSearch= SELECTCOLUMNS( {"QP","QF","QK","QL"},"KeyWord",[Value]) VAR _Cod = MAX('MAIN_DATA TABLE'[Main No]) VAR _Result = COUNTROWS(FILTER(ALL('MAIN_DATA TABLE'),'MAIN_DATA TABLE'[Code] in _KewSearch&&'MAIN_DATA TABLE'[Main No]=_Cod)) RETURN _Result ----------------- L Count = VAR _KewSearch= SELECTCOLUMNS( {"LS","LP"},"KeyWord",[Value]) VAR _Cod = MAX('MAIN_DATA TABLE'[Main No]) VAR _Result = COUNTROWS(FILTER(ALL('MAIN_DATA TABLE'),'MAIN_DATA TABLE'[Code] in _KewSearch&&'MAIN_DATA TABLE'[Main No]=_Cod)) RETURN _Result- AllanBercesPost Prodigy
Hi Ahmedx thank you for the reply but it shows blank
- AllanBercesPost Prodigy
Hi Ahmedx thank you but show same, it count all not on the specific Main No.
- AhmedxSuper User
- AhmedxSuper User
- AllanBercesPost Prodigy
Hi Ahmedx thank you for the reply but it count the overall instead of per Main No. Please note my MAIN DATA TABLE, Main No column has many different no.
DESIRED OUTPUT
Thank you