Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
arusanah
Creator II
Creator II

script help

This logic I have to implement in one of my sense  SimpleKPI objects.

I am creating  3 calculated Dimensions  using expression

If(([New Enrollment]='N' and Enrollment='Y' and Disenrollment='N'),'Enrollment')  as [Enrollment],

if(([New Enrollment]='Y' and Enrollment='Y' and Disenrollment='N'),'New Enrollments')  as [New Enrollment],

if(([New Enrollment]='N' and Enrollment='Y' and Disenrollment='Y'),'Disenrollments')  as [Disenrollment]

My requirement is to  make  above said object   acts as filter.

With above script ,What happens is when I click on one of the above mentioned dimensions  my other two dimension label as well as value returns 0. Where as client wants to see default values in those dimensions. How can I modify my script ?


 

1 Solution

Accepted Solutions
stualsford
Contributor
Contributor

It's possible I have missed the request entirely, however, I read it as you want the 3 text boxes from within your example to stay as their default value (10), even after you have changed the value of the 3 dimensions on the left.

I've done this using set analysis which hopefully does what you're after. The names on the boxes were changing as you were bringing in the field values rather than leaving the caption as text. I have changed that as well but I'm still not sure what you're after.

The current set will ignore ALL other selections. You may not want that. If you remove the one you can nullify the selections of the enrollment types by using

Enrollment:

=Count({$<Enrollment={'Enrollment'},Disenrollment=,[New Enrollment]=>} [Person ID])

New Enrollment:

=Count({$<[New Enrollment]={'New Enrollments'},Enrollment=,[New Enrollment]=>} [Person ID])

Disenrollment:

=Count({$<Disenrollment={'Disenrollments'},Enrollment=,[New Enrollment]=>} [Person ID])

These would allow all of the filters on the other sheet to apply.

(Edited to fix typing)

View solution in original post

14 Replies
sunny_talwar

May be this:

If([New Enrollment]='Y', 'New Enrollments', If(Disenrollment='Y', 'Disenrollments', 'Enrollment')) as Status

arusanah
Creator II
Creator II
Author

no Sunny it doesn't work already tried this option.

you can see commented portion .   if I try this way I can see only one of the 3 objects at a time.

arusanah
Creator II
Creator II
Author

I wont be having list boxes. I just have 3 simplekpi objects. which when user clicks should refresh entire dashboard

tamilarasu
Champion
Champion

I misunderstood the question. OP needs to change script. So, I have removed my comment. Feeling very sleepy in morning.

arusanah
Creator II
Creator II
Author

no worries nagraj!!

tamilarasu
Champion
Champion

See attached file.

arusanah
Creator II
Creator II
Author

this same what I have already done, it doesn't work.

tamilarasu
Champion
Champion

Arusanah,

Have a look at the new attachment.

sunny_talwar

I am not entirely sure as to what the requirement is. May be if what Tamil has provided doesn't work, then please expand a little on your requirement