Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Pujitha
Contributor II
Contributor II

Nested if

Hello Team,

I have condition like- if (result =2 ,'<40 marks')

if (result=3,'>50 marks')

if(result=4,'>60 marks') i have given this in the calculated dimension in the pivot chart. I want to eliminate that many if I want to do that using the set analysis or some functions.Please help me out.

I need to calculate the percentage also like count of <40 marks/Count of total marks like that and need to calculate the average too.Please let me know as soon as possible.

Thanks in advance!!

3 Replies
sudeepkm
Specialist III
Specialist III

if Result is a field in your data model then in your script you can use the same "if else statement" to create a new field and use that field in your chart or you may check class function that takes an "input number" and "interval number" and then displays the result as a Range with upper limit and lower limit between which the input number falls in. like this. 10<=x<20

alextomlins
Contributor III
Contributor III

Hi Pujtha, Not really sure what you mean here. Are you using several if Statements in a chart expression or is it in the script?

Could you try and explain what you have and where you would like to get to? Are you trying to find the percentage of those that got result 2/3/4 as a percentage against the total number of Results.

I'm new to helping people on here but i might be ale to push you in the right direction if i can understand it

Thanks,

Alex

juraj_misina
Luminary Alumni
Luminary Alumni

Hi,

if [result] is a field name, then I suggest to calculate that dimension in script (using nested If or Pick/Match functions). That would eliminate need for calculated dimension and also enable you to easily calculate share %:

Count(marks)/Count( TOTAL marks)

Hope this helps

Juraj