Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mohan_1105
Partner - Creator III
Partner - Creator III

Field name based condition in pivot table

Hi Qliker,

I'm trying to write the condition which qualifies to show the value only for the dimension "Dim 3". I tried using dimensionality function to restrict but when we swap the "Dim 3" to the initial position then it doesn't satisfy our requirement. 

Below is the detail,

 

I have loaded the application with the sample data, in the below snap Column 1 and Column 2 values must display the value only for "Dim 3". Instead of totals, I have coded it has as white space for a look and feel. 

Capture.JPG

 

 

 

When I swap the "Dim3" to the 1st dimension then the values don't group for "Dim3",

Capture1.JPG

I have attached the sample application, loaded with the manual input data. Feel free to include the field in the back end if necessary. 

Thanks in advance !!

Regards,

Mohan

Labels (1)
1 Solution

Accepted Solutions
mohan_1105
Partner - Creator III
Partner - Creator III
Author

Hi Jheasley,

I got the solution for this. Using the getobjectdimension() we could able the write the condition as expected. 

Below is the expression, 

if(GetObjectDimension(Dimensionality()-1) ='Dim 3', Sum(Value),'')

 

thanks,

Mohan

View solution in original post

5 Replies
jheasley
Luminary Alumni
Luminary Alumni

You could try using a variable to set the field names for each dimension, and variable controllers to change them.  this would let you dynamically update what  values are populating each dimension.

mohan_1105
Partner - Creator III
Partner - Creator III
Author

Yeah, I tried that too... but till when I swap the dimension, I couldn't restrict showing the total values for the other two dimensions. 

I tried using the below expression and still, there is no luck, on swapping the "Dim3" variable as the 1st dimension the total values for "Dim1" and "Dim2" dimensions couldn't be restricted. 

=if($(vDim3)=[Dim 3], Sum(Value),
if($(vDim2)=[Dim 2],'',
if($(vDim1)=[Dim 1],'')))

Capture3.JPG

 

basically, I need to show the pivot table measure only for "Dim3" dimension. The other two dimensions are used for selection and to understand the aggregated values. 

jheasley
Luminary Alumni
Luminary Alumni

can you upload a qvf with data and i will take a try.

mohan_1105
Partner - Creator III
Partner - Creator III
Author

Hi,

The sample qvf is uploaded in the main thread. I'm also attaching the sample application qvf again with this reply.

mohan_1105
Partner - Creator III
Partner - Creator III
Author

Hi Jheasley,

I got the solution for this. Using the getobjectdimension() we could able the write the condition as expected. 

Below is the expression, 

if(GetObjectDimension(Dimensionality()-1) ='Dim 3', Sum(Value),'')

 

thanks,

Mohan