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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

How to display formula expressions depending on dimension values?

Hi

I have a pivot table with 2 expressions a & b, lets say a=sum(1) and b=sum(2).

Dimension "x" takes 5 values 1, 2, 3, 4, 5.

I want to display expression a for dimension values 1, 2, 4, and expression b for dimension values 1, 2, 3, 5.

How can I do this?

Thx - Marcel

1 Solution

Accepted Solutions
Not applicable

Hello,

I think I could manage your problem, see the example in attach.

It is not good from performance reasons, but it works.

I wish it helps.

Nik.

View solution in original post

12 Replies
its_anandrjs
Champion III
Champion III

You can write expression with SET analysis

Dimension:- x

Expression a:- Sum({< x ={1,2,4} > } Value)

Expression b:- Sum({< x = {1,2,3,5}>} Value)

Not applicable

set conditionnal expression as match(x,'1','2','3','4','5') and so on

hugmarcel
Specialist
Specialist
Author

Hi

thank you for the proposal, however it does not work. The expression column is still shown, only the values are set to 0. I want to hide the expression column, not just set the values to 0.

thx - Marcel

MK_QSL
MVP
MVP

SUM of What ? Assuming Sales...

SUM({$<x = {'1','2','4'}>}Sales)

SUM({$<x = {'1','2','3','5'}>}Sales)

hugmarcel
Specialist
Specialist
Author

Hi


thank you for the proposal, however it does not work. The expression column is still shown, only the values are set to 0. I want to hide the expression column, not just set the values to 0.


thx - Marcel

MK_QSL
MVP
MVP

Can you provide some sample data in excel file... only 10-15 lines along with your requirements?

hugmarcel
Specialist
Specialist
Author

I'd like to suppress the columns, not only set the values to 0.

1.) Using match(x,'1','2','3','4','5') in the condition of the formula always removes the formula.

2.) Using match(x,'1','2','3','4','5') in the expression just puts values to 0.

So this is not the solution for my request.

hugmarcel
Specialist
Specialist
Author

see attachment.

MK_QSL
MVP
MVP

Not possible in Pivot Table as far as you have values for other Dimensions...