Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Partner - Champion II
Partner - Champion II

Change your measure as follow:

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

sum({<Dimension>}Measure)

)

View solution in original post

6 Replies
ogster1974
Partner - Master II
Partner - Master II

Create a bookmark for users to apply for this senerio.

OmarBenSalem
Partner - Champion II
Partner - Champion II

Change your measure as follow:

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

sum({<Dimension>}Measure)

)

Ralf_Heukäufer
Partner - Creator III
Partner - Creator III

You can also look for some Extensions in Qlik Branch.

Perhabs something like that:

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

Anonymous
Not applicable
Author

I use like this.

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

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

sum(Measure)

)

Anonymous
Not applicable
Author

thank you very much.

Anonymous
Not applicable
Author

thank you everyone!

problem has been solved.