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: 
eheyrman
Contributor
Contributor

Pass variable value too measure expression

I set a function and a variable containing values as such:

SET vFracAggrAvg = fractile(aggr((avg({$<$3={$4}>}$1)),$2),$5);

SET vPercentiles = 0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,0.70,0.75,0.80,0.85,0.90,0.95;

Now I created a table with

=Valuelist($(vPercentiles))

as dimension column to get one of the variable values per row. 

In a second column I set 

=$(vFracAggrAvg(BD100,Beslag,[Reg Maand.autoCalendar.YearsAgo],3,Valuelist($(vPercentiles))))

as measure, hoping to get in each row the calculated value for the corresponding variable value as $5 parameter.

This doesn't work as expected however and I just get gray cells with a '-':

Capture.PNG

Anyone know how I could get the desired result?

1 Solution

Accepted Solutions
Filippo_Nicolussi_P

Hello Evert

Based on the help https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/dollar-sig...  vFracAggrAvg  needs to be evaluated as expression inside the chart, rather than the let x = ...  in the "Dollar-sign expansion using parameters" you should try the "Dollar-sign expansion using an expression"  =$(=vFracAggrAvg(BD100,Beslag,[Reg Maand.autoCalendar.YearsAgo],3,Valuelist($(vPercentiles)))) .

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

1 Reply
Filippo_Nicolussi_P

Hello Evert

Based on the help https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/dollar-sig...  vFracAggrAvg  needs to be evaluated as expression inside the chart, rather than the let x = ...  in the "Dollar-sign expansion using parameters" you should try the "Dollar-sign expansion using an expression"  =$(=vFracAggrAvg(BD100,Beslag,[Reg Maand.autoCalendar.YearsAgo],3,Valuelist($(vPercentiles)))) .

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!