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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
fredericgarnier69
Contributor II
Contributor II

Use a variable with Dimension of Pivot Table

Hello

I need some help 😉

I have dimension AA with values 'one' and 'two'

I have another dimension BB with values 'red' and 'green'

I have several  variables:

one_red = 1,  one_green=2, two_red=3, two_green=4

 

how can I build my formula so that when looping through the table, each cell in the table is the right combination?

 

Pivot table: 

               red  |  green

one          1          2

two           3         4

 

I tried : $(=Only(AA)) & '_' & $(=Only(BB))   right but not evaluated as a varible 😞

Any help will be welcome... Thank's in advance

 

Labels (3)
6 Replies
Rohan
Partner - Specialist
Partner - Specialist

Hi,

Try :

Pick(AA,

pick(wildmatch(BB,'Red','Green'),$(vone_red),$(vone_green)),

pick(wildmatch(BB,'Red','Green'),$(vtwo_red),$(vtwo_green))

)

Regards,

Rohan.

fredericgarnier69
Contributor II
Contributor II
Author

Thank's Rohan

This indeed works, but I want to avoid using the pick and match functions because it is very consuming and in fact, the pivot table is very slow to display.

The solution I am considering must be based on the constitution of a variable...

 

Thank's a lot

BR

Chanty4u
MVP
MVP

Try this 

$(=Only(AA) & '_' & Only(BB))

 

fredericgarnier69
Contributor II
Contributor II
Author

Unfortunetly: Error in expression 😞

 

Rohan
Partner - Specialist
Partner - Specialist

Try :

$($(=maxstring(AA)&_&maxstring(BB)))

 

Regards,

Rohan.

fredericgarnier69
Contributor II
Contributor II
Author

Unfortunately, this is not interpreted as the content of the variable 😞