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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mambi
Creator III
Creator III

Dynamic cyclic group

Hi everyone,

as you can see in the image below , i want to use %dimensions as a cyclic group. but my problems is :

for exemple if i select 'Category' in the  %dimensions listbox and the cyclic group is on 'Category' => the graph will display 100 % which make no sense.

so i want to remove dynamically from the cyclic group the item selected on the %dimensions list box.

any idea ?.

img2.png

15 Replies
stephenedberkg
Creator III
Creator III

what is your expression in % calculation?

mambi
Creator III
Creator III
Author

=if(%dimensions='Category',sum(Qt)/sum(TOTAL <Category> Qt),
if(%dimensions='Country',sum(Qt)/sum(TOTAL <Country> Qt),
if(%dimensions='Product',sum(Qt)/sum(TOTAL <Product> Qt)
)))

mambi
Creator III
Creator III
Author

and here's my loading script :

table:
LOAD * INLINE [
     Category, Product, Country, Qt
     Sport, A, FR, 10
     Sport, B, DE, 9
     Sport, C, CA, 3
     Books, D, FR, 12
     Books, E, EN, 3
     Travel, F, CA, 4
     Clothes, G, FR, 7
];

NoConcatenate
%dims:
LOAD * Inline [
%dimensions
Category,
Product,
Country
]
 


avinashelite

I didn't get your exact requirement but as per your data

your expression is wrong , try like this

if(%dimensions='Category',sum(Qt)/sum(TOTAL  Qt),
if(%dimensions='Country',sum(Qt)/sum(TOTAL Qt),
if(%dimensions='Product',sum(Qt)/sum(TOTAL  Qt)
)))

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Mambi Badi,

Please check if this is what you're looking for

Regards,

MB

mambi
Creator III
Creator III
Author

Hi,

sorry but i need the cyclic group and the graph should be with stacked bars.

mambi
Creator III
Creator III
Author

the problem isn't with the expression but with cyclic group items list,

i used : TOTAL <Category>... because in the %dimensions list box i can select more than one item at a time

miguelbraga
Partner - Specialist III
Partner - Specialist III

I'll make what you want

miguelbraga
Partner - Specialist III
Partner - Specialist III

Here take a look.

Snapshot:

Sem Título.png