Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
luohda
Contributor III
Contributor III

Visualisation incomplete in multiple if conditions

This is my expression:

if(

[method]='M-0010' and [parameter]='M0010'

or (isnull(getfieldselections([method])) and isnull(getfieldselections([parameter])))

, avg({<[methode]={"M-0010"}>*<[parameter]={"M0010"}>} [water_quantity]*24/[measure_duration])

,avg([water_quantity]*24/[measure_duration]*[concentration])

)

I want the graph to show the first condition if the selections of [method] and [parameter] are empty or equal to [method]='M-0010' and [parameter]='M0010', it works:

nothing is selectednothing is selected

parameter=m0010 & method=m-0010parameter=m0010 & method=m-0010

 

However, in other situations the graph doesn't show if I only select a Parameter without selecting the method, it would be empty if i only select let say parameter=S0030. If I want the second condition to show i have to select both parameter and method.

if I delete line:  or (isnull(getfieldselections([method])) and isnull(getfieldselections([parameter]))) in the expression, the graph works correctly, but it doesn't fulfill my requirement. 

Anybody knows how can I change it?

Labels (2)
1 Reply
Anil_Babu_Samineni

If that is the case, use "OR" operator instead "AND" operator

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful