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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
justISO
Specialist
Specialist

Dynamic measures from dimension values.

Hi, I'm stuck a bit with searching a 'workaround': I have multiple KPIs per employee per period and I want to represent that in straight table (or pivot), something like this (with much longer period and more KPIs):

justISO_0-1655209217014.png

I'm searching easier, dynamic way to represent KPIs per period, and avoid writing formula for each months column like

aggr(sum(if(period= Max(total period)), sales)), emp) , same formula, but for minus one month, 2 months and so on..

So I'm started from far away and thinking, maybe it is possible to load dimensions, which name will represent measure name I want to calculate in the first place:

 

temp:
load * inline [
emp, period, sales, customer, score, impact
emp1,2022-05-01, 10, 1, 111, 7
emp2,2022-04-01, 20, 2, 222, 8
emp3,2022-03-01, 30, 3, 333, 9 ];

measure:
load * inline [
measure
sales
customer
score
impact];

 

and define this [measure] dimension to be used as measure name and dynamically calculate each value. I experimented with various combinations and only managed to get working this line ( =$(='sum(' & measure & ')') ) :

justISO_1-1655210451669.png

but only if I select one [measure] value. Is it possible somehow to force expression to think that [measure] value is measure field it needs to calculate?

Labels (1)
0 Replies