Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Swathi
Creator
Creator

my set analysis is not working

i have created one inline table  and used that to filter table data, based on selection. but output is not coming. i didn't understand why it is not 

Inline Table:

Load * Inline [
Volumevscm
<{-30%}and>{30%}
<{-30%}and{10%}-{30%}
<{-30%}and{0%}-{10%}
<{-30%}and{-10%}-{0%}
<{-30%}and{-30%}-{-10%}
<{-30%}and<{-30%}
];

i have created one filter used above inline for filter the data of the table. in the table i wrote to below formula

i have created one inline table  and used that to filter table data, based on selection. but output is not coming. i didn't understand why it is not 

Inline Table:

Load * Inline [
Volumevscm
<{-30%}and>{30%}
<{-30%}and{10%}-{30%}
<{-30%}and{0%}-{10%}
<{-30%}and{-10%}-{0%}
<{-30%}and{-30%}-{-10%}
<{-30%}and<{-30%}
];

i have created one filter used above inline for filter the data of the table. in the table i wrote to below formula

=Pick(
Match(
GetFieldSelections(
[Volumevscm],
'<{-30%}and>{30%}',
'<{-30%}and{10%}-{30%}',
'<{-30%}and{0%}-{10%}',
'<{-30%}and{-10%}-{0%}',
'<{-30%}and{-30%}-{-10%}',
'<{-30%}and<{-30%}'
),
$(vc1), $(vc2),$(vc3),$(vc4),$(vc5),$(vc5),$(vc6)
)

variables formula in the pick match:

$(vc1)= aggr( if( $(vGrowthrateCm2) > $(vv1) and $(vGrowthrateVolume) < $(vv5), sold_to_desc ), sold_to_desc)

$(vc2)=aggr( if( $(vGrowthrateCm2) >= $(vv2) and $(vGrowthrateCm2) <= $(vv1) and $(vGrowthrateVolume) < $(vv5), sold_to_desc ), sold_to_desc )

$(vc3)= aggr(if($(vGrowthrateCm2) >= $(vv3) and $(vGrowthrateCm2) < $(vv2) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc)

$(vc4)=aggr(if($(vGrowthrateCm2) >= $(vv5) and $(vGrowthrateCm2) < $(vv4) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc)

$(vc5)=aggr(if($(vGrowthrateCm2) <= $(vv4) and $(vGrowthrateCm2) < $(vv2) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc)

$(vc6)= aggr(if($(vGrowthrateCm2) >= $(vv3) and $(vGrowthrateCm2) < $(vv2) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc).

 

my pick match formula is not giving output. showing '-' Kindly help me to solve the issue.

 

variables formula in the pick match:

$(vc1)= aggr( if( $(vGrowthrateCm2) > $(vv1) and $(vGrowthrateVolume) < $(vv5), sold_to_desc ), sold_to_desc)

$(vc2)=aggr( if( $(vGrowthrateCm2) >= $(vv2) and $(vGrowthrateCm2) <= $(vv1) and $(vGrowthrateVolume) < $(vv5), sold_to_desc ), sold_to_desc )

$(vc3)= aggr(if($(vGrowthrateCm2) >= $(vv3) and $(vGrowthrateCm2) < $(vv2) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc)

$(vc4)=aggr(if($(vGrowthrateCm2) >= $(vv5) and $(vGrowthrateCm2) < $(vv4) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc)

$(vc5)=aggr(if($(vGrowthrateCm2) <= $(vv4) and $(vGrowthrateCm2) < $(vv2) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc)

$(vc6)= aggr(if($(vGrowthrateCm2) >= $(vv3) and $(vGrowthrateCm2) < $(vv2) and $(vGrowthrateVolume)<($(vv5)),sold_to_desc),sold_to_desc).

 

my pick match formula is not giving output. showing '-' Kindly help me to solve the issue.

 

Labels (2)
1 Solution

Accepted Solutions
Rohan
Specialist
Specialist

Hi @Swathi , I checked your qvf. The issue was with the variable definations as suspected. You had added comment in the variable declaration. It seems Qlik just fetches the whole string as is when calling the variable into your Pick() & that in turn is making your variables after $(vc13) as comment. Please refer the attached image :

Rohan_0-1705563524790.png

Remove this comment & then your dashboard selections should work after 12 too.

 

Regards,

Rohan.

 

 

View solution in original post

14 Replies
Vegar
MVP
MVP

It look like you are missing a closing parentheses. 

=Pick(

Match(

GetFieldSelections([Volumevscm] ),

'<{-30%}and>{30%}',

'<{-30%}and{10%}-{30%}',

'<{-30%}and{0%}-{10%}',

'<{-30%}and{-10%}-{0%}',

'<{-30%}and{-30%}-{-10%}',

'<{-30%}and<{-30%}'

),

$(vc1), $(vc2),$(vc3),$(vc4),$(vc5),$(vc5),$(vc6)

)

Rohan
Specialist
Specialist

Hi Swathi,

I would suggest you make this slight adjustment to your inline :

Load * Inline [
Volumevscm,Sort
<{-30%}and>{30%},1
<{-30%}and{10%}-{30%},2
<{-30%}and{0%}-{10%},3
<{-30%}and{-10%}-{0%},4
<{-30%}and{-30%}-{-10%},5
<{-30%}and<{-30%},6
];

& then use "Sort" in your Pick expression this will reduce your front end calculation time as well as make it easier to manage the expresssions :

=Pick( Sort,

$(vc1), $(vc2),$(vc3),$(vc4),$(vc5),$(vc5),$(vc6) )

 

Regards,

Rohan.

Swathi
Creator
Creator
Author

Thanks roohan, for the reply, it is working for 12 matches after it is not, actualy i have 36 combinations, then it is not working. kindly how i can do

Volumevscm2/Asp
<{-30%}and>{30%}
<{-30%}and{10%}-{30%}
<{-30%}and{0%}-{10%}
<{-30%}and{-10%}-{0%}
<{-30%}and{-30%}-{-10%}
<{-30%}and<{-30%}
{-30%}-{-10%}and>{30%}
{-30%}-{-10%}and{10%}-{30%}
{-30%}-{-10%}and{0%}-{10%}
{-30%}-{-10%}and{-10%}-{0%}
{-30%}-{-10%}and{-30%}-{-10%}
{-30%}-{-10%}and<{-30%}
{-10%}-{0%}and>{30%}
{-10%}-{0%}and{10%}-{30%}
{-10%}-{0%}and{0%}-{10%}
{-10%}-{0%}and{-10%}-{0%}
{-10%}-{0%}and{-30%}-{-10%}
{-10%}-{0%}and<{-30%}
{0%}-{10%}and>{30%}
{0%}-{10%}and{10%}-{30%}
{0%}-{10%}and{0%}-{10%}
{0%}-{10%}and{-10%}-{0%}
{0%}-{10%}and{-30%}-{-10%}
{0%}-{10%}and<{-30%}
{10%}-{30%}and>{30%}
{10%}-{30%}and{10%}-{30%}
{10%}-{30%}and{0%}-{10%}
{10%}-{30%}and{-10%}-{0%}
{10%}-{30%}and{-30%}-{-10%}
{10%}-{30%}and<{-30%}
>{30%}and>{30%}
>{30%}and{10%}-{30%}
>{30%}and{0%}-{10%}
>{30%}and{-10%}-{0%}
>{30%}and{-30%}-{-10%}
>{30%}and<{-30%}
];

and 36 variable output for each conbination

$(vc1),
$(vc2),
$(vc3),
$(vc4),
$(vc5),
$(vc6),
$(vc7),
$(vc8),
$(vc9),
$(vc10),
$(vc11),
$(vc12),
$(vc13),
$(vc14),
$(vc15),
$(vc16),
$(vc17),
$(vc18),
$(vc19),
$(vc20),
$(vc21),
$(vc22),
$(vc23),
$(vc24),
$(vc25),
$(vc26),
$(vc27),
$(vc28),
$(vc29),
$(vc30),
$(vc31),
$(vc32),
$(vc33),
$(vc34),
$(vc35),
$(vc36)
Rohan
Specialist
Specialist

Hi @Swathi ,

Just number your combinations accordingly from 1-36 in the backend inline.

Regards,

Rohan.

Swathi
Creator
Creator
Author

@Rohan , done the same, but still it not working after 12 combinations, still not working 

Load * Inline [
Volumevscm,Sort
<{-30%}and>{30%},1
<{-30%}and{10%}-{30%},2
<{-30%}and{0%}-{10%},3
<{-30%}and{-10%}-{0%},4
<{-30%}and<{-30%},5
<{-30%}and{-30%}-{-10%},6
{-30%}-{-10%}and>{30%},7
{-30%}-{-10%}and{10%}-{30%},8
{-30%}-{-10%}and{0%}-{10%},9
{-30%}-{-10%}and{-10%}-{0%},10
{-30%}-{-10%}and{-30%}-{-10%},11
{-30%}-{-10%}and<{-30%},12
{-10%}-{0%}and>{30%},13
{-10%}-{0%}and{10%}-{30%},14
{-10%}-{0%}and{0%}-{10%},15
{-10%}-{0%}and{-10%}-{0%},16
{-10%}-{0%}and{-30%}-{-10%},17
{-10%}-{0%}and<{-30%},18
{0%}-{10%}and>{30%},19
{0%}-{10%}and{10%}-{30%},20
{0%}-{10%}and{0%}-{10%},21
{0%}-{10%}and{-10%}-{0%},22
{0%}-{10%}and{-30%}-{-10%},23
{0%}-{10%}and<{-30%},24
{10%}-{30%}and>{30%},25
{10%}-{30%}and{10%}-{30%},26
{10%}-{30%}and{0%}-{10%},27
{10%}-{30%}and{-10%}-{0%},28
{10%}-{30%}and{-30%}-{-10%},29
{10%}-{30%}and<{-30%},30
>{30%}and>{30%},31
>{30%}and{10%}-{30%},32
>{30%}and{0%}-{10%},33
>{30%}and{-10%}-{0%},34
>{30%}and{-30%}-{-10%},35
>{30%}and<{-30%},26
];

 

Rohan
Specialist
Specialist

Hi @Swathi , 

Please share a screenshot of what you get when you put Volumevscm & Sort in a simple straight table in front end.

 

Regards,

Rohan.

Swathi
Creator
Creator
Author

@Rohan , Thanks for the reply, it showing '-'

formula iam using

=Pick(Sort,
$(vc1),$(vc2),$(vc3),$(vc4),$(vc6),$(vc5),$(vc7),$(vc8),$(vc9),$(vc10),$(vc11),$(vc12),$(vc13),$(vc14),$(vc15),$(vc16),$(vc17),$(vc18),$(vc19),$(vc20),$(vc21),$(vc22),$(vc23),$(vc24),$(vc25),$(vc26),$(vc27),$(vc28),$(vc29),$(vc30),$(vc31),$(vc32),$(vc33),$(vc34),$(vc35),$(vc36)
)

Swathi_0-1705556658710.png

Swathi_1-1705556710638.png

 

Rohan
Specialist
Specialist

@Swathi , Simply add those 2 fields as dimension in a straight table & do not apply any filters.

Regards,

Rohan.

Swathi
Creator
Creator
Author

@Rohan , when i add seperately in table, it is working fine giving data, after $(vc12) variable $(vc13,14) data is not coming, when i same add same variables in straight table , working fine. even i move variable bottom to up in the pick sort formula aslso, working getting data, onlly first twelve it is taking. after not giving data. there isno issue with variables