Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
NareshGuntur
Partner - Specialist
Partner - Specialist

Show/hide cyclic group

Hi Guys,

I have a Block chart with two Cyclic groups conditionally enabled so that only one will be enabled based on a condition.

To my surprise, if the expression returns no value, both the Groups are coming up.

If it has data, it works fine.

It also works as expected for other charts.

Cheers,

Naresh

8 Replies
MK_QSL
MVP
MVP

Change the condition in dimension tab

For New Group

GetFieldSelections(Test)=1

For New Group1

GetFieldSelections(Test)=2

Also in your example there is no value for Stock... You can change to Sum(Sales) as an expression

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Thanks Manish.

Issue occurs only when there is no value.

If I change it to Sum(Sales), there's no issue.

And it doesn't work even when GetFieldSelections(Test)=1 or 2

Cheers,

Naresh

MK_QSL
MVP
MVP

use this..

jagan
Luminary Alumni
Luminary Alumni

Hi Naresh,

I think it is a bug, the workaround is place text object on top of the cyclic groups and show/hide the text object conditionally.

Regards,

Jagan.

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Still it doesn't work for Stock

MK_QSL
MVP
MVP

It will not work if you don't have any values... because in block chart you don't have option of Suppress Zero Values..

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Looking at your attached file. Your script don't have value for Stocks, populate Stocks in the script reload and your expression will work. With the Enable Conditions (Dimensions) for value in Field Test, use this

if(GetFieldSelections(Test)=1,1,0)  // For Test = 1

if(GetFieldSelections(Test)=2,1,0)  // For Test = 2

This should get you what you want.

Find attached

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Hi Gabriel,

That's where I started. My Stock has no value and only then this issue arises. For example, there is no stock and so I can't populate stock.

My very first question says

" To my surprise, if the expression returns no value, both the Groups are coming up."