Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Live Chat, June 29th 10AM ET. Bring your Qik Sense Enterprise, Client Managed questions! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
laylagirl
Contributor III
Contributor III

Set Analysis - disregard current selection ?

Hi all,

Here is a Dimension -

MKTGvsBU  has values :  'MKTG' , 'BU'

Here is a bar chart showing sum of sales for  'MKTG' , 'BU'

Expressions in bar chart

Bar 1. sum ( { $ <MKTGvsBU = {'MKTG'}>} sales)

Bar 2. sum ( { $ < MKTGvsBU = {'BU'}>}sales)

When I make selections in MKTGvsBU filter the bars do not change.

How do I disregard current selection so that the bars will respond to filter selections  ?

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({$<MKTGvsBU *= {'MKTG'}>} sales)

Sum({$<MKTGvsBU *= {'BU'}>} sales)

Read about the * sign here:

Implicit Set Operators

View solution in original post

12 Replies
OmarBenSalem
Partner
Partner

With your expressions , you've fixated the bars and forced them not to change if you filter by your MKTGvsBU   dimension.


With that said, your question is not clear; what exactly do u want to do?

luismadriz
Specialist
Specialist

Hi, just create a bar chart with dimension MKTGvsBU  and measure Sum(Sales)


Maybe there is something else you haven't said yet,


Cheers,


Luis

devarasu07
Master II
Master II

HI,

Refer to the attached sample,

method 1 :

set identifier of 1, which ignores all selections and return full set value.

Fact:

LOAD * INLINE [

    Date, MKTGvsBU, Sales

    30/10/2017, MKT, 2500

    11/10/2017, BU, 3780

    9/11/2017, MKT, 1900

    17/10/2017, BU, 2400

];

You dimension

MKTGvsBU

Bar expression for BU:

Sum({1<MKTGvsBU={'BU'}>}Sales)

Bar expression for MKT:

Sum({1<MKTGvsBU={'MKT'}>}Sales)


Method 2:

by using alternate state

Sum({$< MKTGvsBU= $::MKTGvsBU,MKTGvsBU={'BU'}>}Sales)

Sum({$< MKTGvsBU= $::MKTGvsBU,MKTGvsBU={'MKT'}>}Sales)

Capture.JPG

sunny_talwar

Try this

Sum({$<MKTGvsBU *= {'MKTG'}>} sales)

Sum({$<MKTGvsBU *= {'BU'}>} sales)

Read about the * sign here:

Implicit Set Operators

View solution in original post

laylagirl
Contributor III
Contributor III
Author

Sorry guys none of the suggestions work.  Sunny it says  ! Error in expression . Alternate States is not working either

The bars must show  sum ( Sales) for the 2 separate units as stated int he expression. ( MKTG, BU)  But also must respond to filter selection  (MKTG , BU)    . Bars are not moving due to set analysis expression.

sunny_talwar

Alternate State? Where did the alternate state come from?

laylagirl
Contributor III
Contributor III
Author

Devarasu's reply 

sunny_talwar

For the expressions I provided, what error message are you getting?

laylagirl
Contributor III
Contributor III
Author

Ok it works now Sunny. It was the spacing ! I had space between  MKTGvsBU * . It's MKTGvsBU*    Thank you so much !!!