Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lixingkai
New Contributor III

How to set selected dimensions when start in QS

Hello, friends.

I met a problem need to be solved. please read the description below.

for example, i have a table as below.

DimensionMeasure
A2
B4
C3
D5

by default, if i do sum(Measure), measure is 14.

and i can select Dimension A, then measure is 2.

it is ok for me..

now, i want to do sum({<Dimension={‘*’}-{‘B'}>}Measure) as default result (10) when i open the report.

later, if i  manually select the Dimensions A-D, the Measure result is 14.

that means B is not really filtered. it is just not taken into account at the beginning.

any solution for that?

thank you very much.

BR

Larry

1 Solution

Accepted Solutions
OmarBenSalem
Esteemed Contributor

Re: How to set selected dimensions when start in QS

Change your measure as follow:

if(len(getfieldselections(Dimension)))=0, sum({<Dimension=-{'B'}>}Measure),

sum({<Dimension>}Measure)

)

6 Replies
ogster1974
Honored Contributor II

Re: How to set selected dimensions when start in QS

Create a bookmark for users to apply for this senerio.

OmarBenSalem
Esteemed Contributor

Re: How to set selected dimensions when start in QS

Change your measure as follow:

if(len(getfieldselections(Dimension)))=0, sum({<Dimension=-{'B'}>}Measure),

sum({<Dimension>}Measure)

)

Ralf_Heukäufer
Contributor III

Re: How to set selected dimensions when start in QS

You can also look for some Extensions in Qlik Branch.

Perhabs something like that:

http://branch.qlik.com/#!/project/5775290349fc1bfca8047ad2

lixingkai
New Contributor III

Re: How to set selected dimensions when start in QS

I use like this.

if(len(getfieldselections(Dimension))=0,

sum({<Dimension=-{'B'}>}Measure),

sum(Measure)

)

lixingkai
New Contributor III

Re: How to set selected dimensions when start in QS

thank you very much.

lixingkai
New Contributor III

Re: How to set selected dimensions when start in QS

thank you everyone!

problem has been solved.

Community Browser