Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: Visualisation incomplete in multiple if conditions

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)