Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I have a query regarding the Pie Chart . As per my scenario I have to segregate the values of pie as follow
If srnumber is =1 then One
If srnumber is =2 then Two
If srnumber is =3 then Three
If srnumber is >=3 then 'All'
first 3 condition can be achieved but in the last case I am unable to rectify the issue or what is going wrong.
Thanks in advance , any help is appreciated.
Check this out
I believe the calculation dimension should say:
=If(srnumber >3 ,'All', srnumber)
BTW: Calculated dimension are not very efficient.
it would be better to create a new field at the script level using the same logic
Load:
.
.
If(number >3 ,'All', srnumber) As YourPreferedName
Feeling Qlikngry?
Hello Neelam,
1st of all thanks for reply. the condition which you used by that we can not see that how many records are there in the specific pie. Hence, it is partially correct to get the desired output. By the way I get the solution by adding calculated field as below.
=if(Srnumber=3 ,3,
if(Srnumber=1 ,1,
if(Srnumber=2 ,2,
if(Srnumber>=3 ,'All',
))))
So did it work or you are still working on the measure part???
Sorry for being picky:
Is that really correct?
=if(Srnumber=3 ,3,
if(Srnumber=1 ,1,
if(Srnumber=2 ,2,
if(Srnumber>=3 ,'All',
))))
Hello Robert ,
Yes It is correct.we have to create calculated dimension using the above formula and in expressions we have to give the count for srnumber (i.e. Count(srnumber)).
Does Robert Mika Expression suitable for you?
Or exactly, see this
=If(srnumber =1,'One',If(srnumber =2,'Two',If(srnumber =3,'Three',If(srnumber >3,'All'))))
My concern was related to the calculation:
Yuu got >=3 and =3.
This way some of the values are being calculated twice.