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: 
Thathayoyo
Contributor III
Contributor III

Pivot Table: How to get the name of the dimension placed in first dimension

Hello,

I have a pivot table where i want to know the name of the first dimension ( Item Desc in the exemple below) so that i can store it in a variable. For exemple if the first dimension is Item Desc then my variable need to return Item Desc. If the user is moving Product Group as the first dimension then the variable need to return now Product Group.

Thanks.

 

Thathayoyo_0-1733924150263.png

 

Labels (6)
11 Replies
NoahF
Contributor III
Contributor III

You put this:

=if( $(vToggle) = 1, [Item Desc] , 
	if( $(vToggle) = 2, [Product Group], [Customer]))

 as your Dimension. As your field. Instead of [Item Desc] for example. Put the whole expression, and then with your toggle it will change, based on the selection. This should always stay your first dimension then. The user should not switch them manually but use the variable input object instead, to switch the first dimension. 
It's a workaround.

Thathayoyo
Contributor III
Contributor III
Author

Thanks