Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kiara
Contributor II
Contributor II

please help new to Qlik

Hi friends , I am new to qlik. please help.

I want to add 1 more condition in my if statement with aggregation function and that is a calculated field.

I need to add add 1 more condition in the following expression :
min(if([Service.Service Code Raw] = 'H0031' or [Service.Service Code Raw] = '90791',[Service Payor.Date of Service]))

Condition to add:

(max(if([Service.Service Code Raw] = 'H0046' ,[Service Payor.Date of Service]))) <= (min(if([Service.Service Code Raw] = 'H0031' or [Service.Service Code Raw] = '90791',[Service Payor.Date of Service])))

 

Actually these are measures in the table. In these expressions I am trying to get the maximum or minimum date of service a based on the service code .

Like in this expression min(if([Service.Service Code Raw] = 'H0031' or [Service.Service Code Raw] = '90791',[Service Payor.Date of Service]))

I am getting the min of date of service for codes h0031 and 90791. But for some codes I want that "date of service should be greater than date of service of Hoo31 and 90791.

I hope it gives some clarity.

All these are calculated fields that's why I am getting difficulty with aggregated functions.

Labels (4)
1 Reply
Digvijay_Singh

Try something like this, if you can share sample data/app, more help can be provided

rangemax/rangemin  //based on what is needed, use aggr if required based on results

(

min({<[Service.Service Code Raw]={'H0031','90791'}>}[Service Payor.Date of Service]),

Max({<[Service.Service Code Raw]={'H0046'}>}[Service Payor.Date of Service])

)