Hi, Basically you can use KQL to check if the parameter is empty or not and have different condition based on that. I do not have the full details of your workbook nor your data from Log Analytics but the query should look something like the one below where only one line is modified. You may need some small editing if it does not work right away in your case.
let endDateTime = {timeRange:end};
let startDateTime = {timeRange:start};
KubeEvents
| where TimeGenerated >= startDateTime
| where TimeGenerated < endDateTime
|extend ServiceName = split(Name, "-")[0]
| where isempty('{ServiceName}') or (ServiceName in ('{ServiceName}'))
|extend PodName=Name
|where Namespace in ({Namespace})
|where ObjectKind in ('Pod')
|project TimeGenerated, ObjectKind,Namespace,ClusterName, ServiceName,PodName, Reason,Message,FirstSeen,LastSeen,Count
| summarize arg_max(TimeGenerated, *) by PodName
Update Option 2:
Make the parameter required.
On the section for your query Configure advanced settings by checking Make this item conditionally visible with the name of the parameter (Test1 in the screenshot) is not equal to empty value.
Add another section of type Text. Set text style to Error and enter the message you want to appear:
Configure advanced settings and check make this item conditionally visible with the name of the parameter (Test1 in the screenshot) equals to empty value.
That way you will have one section displaying error when the parameter is not configured and another one when it is configured.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.