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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a dimension of a straight table as a parameter of an expression

Hello,

I'm using a variable with parameters and I want that one of the parameter be the dimension of a straight table. So that the calculation is made depending on the value of the dimension. Each value of the dimension corresponds to a different field in my facts table. It's OK if I choose only one value in my dimension, but if I choose no values are several values, it doesn't work anymore.

My variable is :

V_Amount_Country

Sum({1 <View = {"$2"},$CalendarId={"$3"}>} [$1])

The dimension in the straight table is called PnlDim, and I call it through the parameter $1 in my expression :

=$(V_Amount_Country($(=PnlDim),Actuals,20120100))

Any idea ?

3 Replies
jvitantonio
Specialist III
Specialist III

HEre you go

Not applicable
Author

Yes, this is a solution, but actually I have quite a lot of values in my dimension and not only 3, and I'd prefer not to repeat many times almost the same variable

jvitantonio
Specialist III
Specialist III

I was kind not to say that you should change your data model

If that's what you want to do with that data model, then that's the way to go, sorry. Or at least I can't think of any other solution