Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mohitd910
Creator II
Creator II

Set Analysis depends upon different Conditions

Dear Friends,

Requirement is in QlikSense . Not in Qlikview. No Conditional chart is present.

I Have Doctors and Year Like

Doctor     Year                         Revenue

Sunny      2014,2015 ,2016        455667

Manish    2014, 2015                 467787

Arjun       2014, 2015 ,2016        454767

Jagan      2015                           754344

Mohit       2014                            4577



Now Requirement is

1.) if i don't select any thing then current year.

2.)if the doctor is selected Like manish current year is not present then chart should be blank.

3.) but if we select again a year for manish like 2014 in the data should show for the 2014 year. Then it will depend on the selected Year.



Regards,

Mohit Dahiya

1 Solution

Accepted Solutions
sunny_talwar

So may be like this:

Sum({<Year = {"$(=If(GetSelectedCount(Year) = 0, Max({1}Year), Max(Year)))"}>}Revenue)

View solution in original post

17 Replies
sunny_talwar

Chart should be blank, but it should be visible or should it hide? If it should be visible, you can play with GetSelectedCount() function, right?

mohitd910
Creator II
Creator II
Author

@sunny Bro No issue can be visible.Yes i Can play with get selected Count. Thanks bro i will try.

sunny_talwar

So may be like this:

Sum({<Year = {"$(=If(GetSelectedCount(Year) = 0, Max({1}Year), Max(Year)))"}>}Revenue)

mohitd910
Creator II
Creator II
Author

Max({1}Year) Bro can you explain this

sunny_talwar

Max({1} Year) is going to calculate Max(Year) ignoring any selection because I have used {1} in the set analysis.

mohitd910
Creator II
Creator II
Author

Thanks bro i got it.set identitfiers.

mohitd910
Creator II
Creator II
Author

If bro i need same conditions on doctors. if nothing is select then current years doctors other wise according to the years.

sunny_talwar

Doctor is an expression or dimension?

mohitd910
Creator II
Creator II
Author

Dimension