Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional Header

Dear all

I need conditional header based on first header for below both cases.

If F2 = 'P' than F3 or VALUELIST should be 'X' only(Y & Z want to hide in case of F2 =P)

Case 1: Actual data(F3) used as dimension

Case 2: Valuelist used instead of F3

Capture.PNG

Sample QV attached. I appreciate your help and efforts

Thanks

1 Solution

Accepted Solutions
alexpanjhc
Specialist
Specialist

8 Replies
sunny_talwar

You want it for both the charts?

Actual Dim from Data chart's expression:

If((F2 = 'P' and F3 = 'X') or F2 <> 'P', Sum(V1))

Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny

Thanks for quick help, I will try after sometime.

I need solution in both cases please.

Thanks again

Peter_Cammaert
Partner - Champion III
Partner - Champion III

=If ((F2 <> 'P') or (F3 = 'X'), Sum(V1))

sunny_talwar

May be this with the ValueList:

If(F2 <> 'P' or not Match(ValueList('X', 'Y', 'Z'), 'Z', 'Y'),

  If(ValueList('X', 'Y', 'Z') = 'X', 11,

  If(ValueList('X', 'Y', 'Z') = 'Y', 22,

  If(ValueList('X', 'Y', 'Z') = 'Z', 33))))

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Why doesn't Sunny's table get filled like in your example? Because as soon as you introduce an existing field in the expression, normal associative logic kicks in and only existing combinations of dimension values will produce an expression result.

sunny_talwar

Hahahaha and I was too shy to admit that the results don't match because I did not know why they were not. Thanks Peter

alexpanjhc
Specialist
Specialist

maybe like this?

Anonymous
Not applicable
Author

Hi Sunny

It works .

Thanks for suggestion.