Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vidyasagar159
Creator II
Creator II

Add AVG and MEDIAN functions to a drop down list

Hi ALL,

I have a simple aggregation function drop down list requirement and I am using Qlik Sense WEB Version only.

Example:

I have drop down extension already. Now I have added column called AGGRNAMES to it by creating an INLINE table in load script editor. Now these two Values called AVG and MEDAIN  are showing up in that drop down list. 

Measure:

SUM(Sales)  

Now when I select "AVG" from drop down list the function has to change in the measure. 

AVG(Sales)

I tried pick match but no luck.

Thanks in Advance!!

-Vidya

Labels (3)
1 Solution

Accepted Solutions
rubenmarin

Hi Vidya, you can add a second field to your inline table to use as an index for Pick()

LOAD * Inline [

AGGRNAMES, IdAGGRNAMES

SUM, 1

AVG, 2

];

 

Expression: Pick(Min(IdAGGRNAMES), Sum(Sales), Avg(Sales))

View solution in original post

2 Replies
rubenmarin

Hi Vidya, you can add a second field to your inline table to use as an index for Pick()

LOAD * Inline [

AGGRNAMES, IdAGGRNAMES

SUM, 1

AVG, 2

];

 

Expression: Pick(Min(IdAGGRNAMES), Sum(Sales), Avg(Sales))

vidyasagar159
Creator II
Creator II
Author

Thank you. It worked.