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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Different data depending on filter

hello,

i have the following data: and i would like depending what i choose on the filter to show different data:

for example:

on segment i should have only segment 1,2 and 3, but i  choose the first and second segment the result it has to be 34.

¿can you help me?

Segmentsum(Clients)
1-234
1-3543
2-3434
1-2-3342
154
243
3654
1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Hi,

May be like as at attached file?

Regards,

Andrey

View solution in original post

5 Replies
Chanty4u
MVP
MVP

hi you can create flags  in script like below

aa:

load * Inline [

Segment ,sum(Clients)

1-2 ,34

1-3 ,543

2-3 ,434

1-2-3, 342

1 ,54

2 ,43

3 ,654

];

result:

LOAD * ,

if(Segment='1-2',0) as flag1,

if(Segment,'1-3',1) as flag2,

if(Segment,'1-2-3',2) as flag3

.........like all

Resident aa;

ahaahaaha
Partner - Master
Partner - Master

Hi,

May be like as at attached file?

Regards,

Andrey

MarcoWedel

Hi,

maybe you could use an AND-mode List Box on a subsegment field to achieve this result:

QlikCommunity_Thread_269500_Pic1.JPG

QlikCommunity_Thread_269500_Pic2.JPG

table1:

LOAD Text(Segment) as Segment,

    Clients

inline

[Segment,Clients

1,54

2,43

3,654

1-2,34

1-3,543

2-3,434

1-2-3,342];

tabSegments:

LOAD Distinct

    Segment,

    SubField(Segment,'-') as Seg

Resident table1;

hope this helps

regards

Marco

pathiqvd
Creator III
Creator III

Hi,

    Try like this,

 

step1:-

load Distinct *,SubField(Segment,'-') as Segment1 inline [

Segment,Clients

1-2,34

1-2,30

1-3,543

2-3,434

1-2-3,342

1,54

2,43

3,654

];

step2:-

Create one variable like  vSeg=if(GetSelectedCount(Segment1)>1,Concat(distinct Segment1,'-'),Segment1)

Segmen1 field take as filter and write exp like,

=sum({<Segment={"$(vSeg)"}>}distinct Clients)

Regards,

MarcoWedel

maybe also possible:

QlikCommunity_Thread_269500_Pic3.JPG

QlikCommunity_Thread_269500_Pic4.JPG

regards

Marco