Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Selections on list box and calendar

!Hi All,

I have been struggling with this for hours .upon continuous investigations with my problem i could find out few causes for my problem .

I have list box and calendar object.

List box has value Day,MTD,Ytd

Calendar object Sales_date

My requirement is upon selecting particular date i need to know ytd,mtd and day values for that particular date .

Lets Assume i need to find net sales for particular date i.e 2/2/1014.

First i select date and any value from list box (any of the value mtd,ytd,day)  then i get the desired result .

for the same date with out changing the date value ,if i select any of list box value then values is the calendar is getting clear.

I need calendar shouldn't be cleared .

Please find the attachment

18 Replies
svenkita
Creator II
Creator II

hi

I started a new file and did a binary load of your file and had the changes done to the script ... the selections do not get deselected.

try it out.. i am unable to attach the file due to the size.

SCRIPT

---------

Binary ;

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;-$#,##0.00';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='D/MM/YYYY';

SET TimestampFormat='D/MM/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

NoConcatenate

CAL1:

Load * Resident CAL;

Drop Table CAL;

NoConcatenate

Cal_TimeGranule1:

Load DATE_KEY, Num, TempDate, TimeGranule Resident Cal_TimeGranule;

Drop Table Cal_TimeGranule;

NoConcatenate

Fct_Sales1:

Load Num(Date(Date#(DATE_KEY,'YYYYMMDD'),'YYYYMMDD')) as DATE_KEY, CAL_DATE, CY_GROSS_SALES Resident Fct_Sales;

Drop Table Fct_Sales;

Anonymous
Not applicable
Author

Thanks Subharaman !!!

i'll check with the script .

Thanks alot

svenkita
Creator II
Creator II

could you reduce the size of your file by loading data only for 6 months and have it attached. I will make the changes and send back

Anonymous
Not applicable
Author

Hi

Subraman

I have attached qvw with one month data.Please find the attachment in question of this discussion.

Thanks

svenkita
Creator II
Creator II

Hi

If you look at your data in the fact table there is only one date available. all the transactions are of 07/01/2014

any way i have worked on the model using sample data and changed the model for you

the whole thing is done using data islands and depending on what you select

MTD

YTD

DAY

the formula in the text field will change according.

Hope this helps

Anonymous
Not applicable
Author

Hi

Thanks alot for your time.

I have tried the application.But set expression seems to be not working fine .

i tried the below the expression its throwing error

error.png

If(TimeGranule='DAY',sum({<DATE_KEY={$(=Only(Star_Date))}>}CY_GROSS_SALES))

thanks

svenkita
Creator II
Creator II

i have added a new text with the formula

the new text is yellow

svenkita
Creator II
Creator II

sorry there was an issue in the file i have re attached the file kindly download and check

Anonymous
Not applicable
Author

Thanks a ton subraman