Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

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
Highlighted
Luminary
Luminary

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.

Highlighted
Partner
Partner

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. 

Highlighted
Luminary
Luminary

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

Highlighted
Partner
Partner

Hi,

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

Highlighted
Partner
Partner

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