Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

If than based on selections

I have a Qlik Sense app where I have dimensions for distributor name and distributor code plus one measure for sales.  I am trying to create a table that shows sales data using the distributor name when it is selected in the distributor name filter box or distributor code for the distributor names not selected.  I am using set analysis to show sales for all distributors regardless of the distributor name selections.  I need this to work if one or multiple distributor names are selected.

1 Solution

Accepted Solutions
Partner
Partner

Try an expression like this:

=AGGR(if( ONLY({1}DistributorName)=ONLY(DistributorName),
DistributorName,
ONLY({1}DistributorCode))
, DistributorName)

 

See attached QVW

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

3 Replies
Partner
Partner

I found it hard to pinpoint the core of your problem. Do you think you could post a sample of what you are trying to do? It should be easier to help you if you do so.

-Vegar

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Contributor II
Contributor II

I attached a sample Qlikview app. 

There is a chart in the app that I want to show the DistributorName for all selected in the DistributorName list box and the DistributorCode if the DistributorName is not selected.

 

Partner
Partner

Try an expression like this:

=AGGR(if( ONLY({1}DistributorName)=ONLY(DistributorName),
DistributorName,
ONLY({1}DistributorCode))
, DistributorName)

 

See attached QVW

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post