Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
mohitd910
Creator II
Creator II

Condition on Dimension

Dear All,

I have a dimension Doctor.

I am using it as a filter.

Conditions:-

1.) If i don,t select any year then need to show doctors for current year .

2.) otherwise according to the years selections.

Like

Doctor     Year                         Revenue

Sunny      2014,2015 ,2016        455667

Manish    2014, 2015                 467787

Arjun       2014, 2015 ,2016        454767

Jagan      2015                           754344

Mohit       2014                            4577



By default 2 doctors will be present in the List box only Sunny And Arjun.

If i selected 2015 then Manish and Sunny and Arjun, Jagan will be in List box.

And if i selected 2014 then All except jagan.

Regards,

Mohit Dahiya


1 Solution

Accepted Solutions
sunny_talwar

Can you check here

View solution in original post

16 Replies
mohitd910
Creator II
Creator II
Author

Please find the attached Sample data. ! !

MK_QSL
MVP
MVP

use this as list box expression

=Aggr(Concat({<Year = {"$(=Max(Year))"}>}DISTINCT Doctor,','),Doctor)

or

=Aggr(IF(GetSelectedCount(Year) = 0,

IF(Match(Doctor, $(=CHR(39)& Concat({<Year = {'$(=Max({1}Year))'}>}DISTINCT Doctor,CHR(39)& ',' & CHR(39)) & CHR(39))),Doctor),

Doctor),Doctor,Year)

sunny_talwar

Can you check here

mohitd910
Creator II
Creator II
Author

Not Working Sir.

MK_QSL
MVP
MVP

List box expression means you have to create list box using this expression.

This is working on my qliksense..

please try again.

mohitd910
Creator II
Creator II
Author

Sunny Bhai in Full form

sunny_talwar

Mohit -

Did you check that I used the same exact expression I gave you on the other post? I just copy and pasted. I am not sure why did you think it was not working? Can you clarify what you were doing differently?

Thanks,

Sunny

mohitd910
Creator II
Creator II
Author

Don't Know bro. then i think i was using something wrong there.

mohitd910
Creator II
Creator II
Author

Sunny bro one problem is here i am unable to select two Doctors at a time and for date and month it is not working