Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Femke_DPG
Contributor III
Contributor III

If there is no value '1', then pick '2'

Hi experts

I have a question on which I do not find an answer online. 

When value '1' does not exist, it has to take '2' in the set analysis of a calculation. If 1 does exist, it has to take '1'.

I had made a new dimension in the load editor, but it is not correct.

if(Min([Position Group])='2', '1',[Position Group]) as TEST

In this example '1' exists as position group and in TEST it takes value '1' 2 times, while in this example it has to take just value '1' because it exists. It counts dubble when I use '1' in set analysis:

Femke_DPG_0-1657525201169.png

In this example it is correct, because there is no value '1' in the column 'position group' and 2 became 1:

Femke_DPG_1-1657525430489.png

Thank you for helping me out! 

Femke

 

Labels (1)
1 Reply
JHuis
Creator III
Creator III

Hello,

 

can you give me the values what you are trying to do in the last colum?

 

Brodcast Date Break label Position group TEST
2022-01-02 A85 3-98  
2022-01-02 A85 1  
2022-01-02 A85 2  
2022-01-02 A85 99  
2022-01-02 A85 100