Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

kumarkp412
Contributor II

Dynamic dimension

Hi friends

I were struck in creating the dynamic dimension by an expression with a category.

i.e Category as A,B,C,D,E.

I need to create a pivot table how many employees having average value  were layed in that category.

Below is the category creation.

Category Name ,Value.

A - >8

B - 6 and 7

C - 4 and 5

D -  <4

E- 0

Average value-sum(value)/count(months)

how we will relate the average values in the above category.

Sample data

Empidvaluemonth
A15Jan
A28Jan
A12Feb
A28Feb
A310Feb

Final output:

Categroyno of employess
A2
B0
C1
D0
E0

Can any one help me on this.

Please provide me any suggestions.

Thanks

Kumar KVP

5 Replies

Re: Dynamic dimension

Hi,

Try interval match function to achieve this.

https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/Scripting/ScriptPrefixes/Inte...

Regards,

Kaushik Solanki

kumarkp412
Contributor II

Re: Dynamic dimension

Hi Kaushik,

Thanks for your reply,

I am having one doubt in that, when I filter a particular month it should calculate the average  based on that i.e sum(values for selected months )/count(selected months) .

So here how it will be give you the dynamic category.

Thanks in advance.

Thanks

Kumar KVP

dwforest
Valued Contributor

Re: Dynamic dimension

this is the default behavior of Qlik, measures are recalculated based on current selection unless a set expression is added to override the selections

kumarkp412
Contributor II

Re: Dynamic dimension

Hi David,

Yes your right, but my question is ,

when we make a selection on the months, average value calculation  should be recalculated and based on the average i need to show that which category  he belongs.

I am able to get the average calculation,but i need to show the chart based on the category. So here struct ...

Please advice me how can i able to achieve this.

Thanks in advance,

Thanks

Kumar KVP

dwforest
Valued Contributor

Re: Dynamic dimension

Still sounds to me like standard Qlik behavior; have you tried building it and not gotten a working solution?

The Category would be built something like:

if(Avg(value)>8, 'A',

     if(Avg(value)>=6, 'B',

         if(Avg(value)>=4, 'C',       

              if(Avg(value)>0, 'D','E'))))



Community Browser