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: 
niha
Creator II
Creator II

Calculated Dimension by If else statement

hi,

I wanted to create a calculated dimension. here is my syntx but something is wrong . 

if ([Task Name] =('Travel',[External],[HR],[COM],[ECO]),[Task Name],'TopTask')

looks like there are errors in bracket. 

 

My logic is if Task Name is Travel, [External],[HR],[COM],[ECO], then I want to name as Top Task. Please help. 

 

Thanks,

Niha

1 Solution

Accepted Solutions
sunny_talwar

May be this

If(Match([Task Name], 'Travel, 'External', 'HR', 'COM', 'ECO'), 'TopTask', [Task Name])

View solution in original post

2 Replies
sunny_talwar

May be this

If(Match([Task Name], 'Travel, 'External', 'HR', 'COM', 'ECO'), 'TopTask', [Task Name])
niha
Creator II
Creator II
Author

Thanks Sunny. I found no error after trying your code but the output did not solve the purpose. For example I have a Task column which has 70 different task and the name of the column is Task Name. For some need I want to see some specific task . Out of 70 I want to see the sale of 7 imp task. So I created a calculated dimension . So, in a bar chart I can show one dimension Region, calculated dimension( say top task) and measure will be say sales. The calculated dimension has to be sliced and diced like a stack bar chart. So my horizontal will be region , stacked bar will be top task ( it should show only 7 kind of task) and measure is sales. while writing the calculation I found all task except the 7 task may be or something weird. Please suggest.
Thanks,
Niha