Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default Selection with two states

Dear All,

I have a qlikview document with two states and and listboxes with expressions one that looks at past events and one that looks at future events. I have tried a lot of tricks to have a default selection but i have failed.

Also the line chart is refusing to show data for dates between max date and max(date)- 7

Could you kindly assit me please i have attached a copy

1 Solution

Accepted Solutions
Not applicable

Ok let me explain I look at the number of patients 300 doctors see and also patients who have appointments booked, that is past events and future events hence the need for 1 sheet that looks at patients seen with the pastdays flag = 1 and future booked patients with pastdays flag = 0.

so i have restricted the days displayed in the all listboxes to show previous days for the sheet that looks at past days and the opposite for the sheet that looks at future patients.

i achieved this by using the expression If(pastday =  1, date, null()) in the sheet that looks at patients seen and the expression If(pastday =  0, date, null()) in the sheet that looks at patients who have appointments.

As you can tell this will be a lot of data because each doctor sees a average of 20 patients a day.

Therefore i want the list box Month to have atleast one selection, when the document is opened or activated meaning if a user want to see all the data instead of clearing all selections the option will be to select all the months. if the user clears all selections the current month will be selected.

I have tried this solution >>>>>     www.qlikcommunity.org/message/187564 , http://www.qlikcommunity.org/message/187564        and it did not work.

View solution in original post

7 Replies
sunny_talwar

Not sure I understand your list box issue, can you elaborate what exactly are you hoping to see? For the second issue, try this expression:

Sum({$<PastDay = {1},DayCounter = {"$(='>=' & (Max(DayCounter)-7) & '<=' & Max(DayCounter))"}>} TotalOps)

Capture.PNG

Not applicable

Hie thank you for reply, I had made a lil bit progress please see the file attached for the list box i want atleast one selections to be made when i open or when i activate the sheet. basically i want at least 1 selection on the month always. this will help because if i clear all the trend line will not show have a look at the file

Not applicable

Sum({<DayCounter = {">=$(=MAX(DayCounter)-56) <=$(=MAX(DayCounter)-36)"}, WorkingDay = {1}>} TotalOps)

Sum( {$<PastDay = {1}, DayCounter = {">=$(=MAX(DayCounter)-30) <=$(=MAX(DayCounter))"}>} TotalOps)

tt.PNG

sunny_talwar

Again I am not 100% sure as to what exactly you want to do. Would you be able to give some examples as to what needs to happen in the application?

Not applicable

Ok let me explain I look at the number of patients 300 doctors see and also patients who have appointments booked, that is past events and future events hence the need for 1 sheet that looks at patients seen with the pastdays flag = 1 and future booked patients with pastdays flag = 0.

so i have restricted the days displayed in the all listboxes to show previous days for the sheet that looks at past days and the opposite for the sheet that looks at future patients.

i achieved this by using the expression If(pastday =  1, date, null()) in the sheet that looks at patients seen and the expression If(pastday =  0, date, null()) in the sheet that looks at patients who have appointments.

As you can tell this will be a lot of data because each doctor sees a average of 20 patients a day.

Therefore i want the list box Month to have atleast one selection, when the document is opened or activated meaning if a user want to see all the data instead of clearing all selections the option will be to select all the months. if the user clears all selections the current month will be selected.

I have tried this solution >>>>>     www.qlikcommunity.org/message/187564 , http://www.qlikcommunity.org/message/187564        and it did not work.

View solution in original post

Not applicable

Hi SunnyT

After closing and re-opening the document i found out the solution on the link that i sent in my previous result actually works it the issue is it just does not highlight the selection so the user will not know

see pik belowsolution.PNG

sunny_talwar

Awesome, I am glad you found your solution. Please mark your own response as correct so that others in the future can find it easily if they land up on this thread for help.

Thanks,

Sunny