Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set expression to select month in YYYY-MM-DD

Hi

I´m really stuck at how to do the following. When I select a month (jan-dec) I would like a set expression(?) in a chart that count the correspondingly post in the field of DateFactFrom. The results should be the same as if I manually wright *-SelectedMonthNr-*

Anyone that can tell/show me how to this? If it´s to any help I can upload the file.

qv1.JPG

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

There are a lot of posts in the forum, QlikViews and Docs on how to create a master calendar. You are analyzing two different dates, so only one calendar is not enough and will make very confusing the expressions in the charts. I'd create a new calendar for the date DateFactFrom in a table which fields will be shown in the sheet to allow users to do selections in either DateFactFrom or DateFactTom.

Anyway, you can go to the Settings menu, Document Properties, Triggers, select Field Event Triggers so when you select or change the selection in a field Year or Month, this selection is passed on to the field DateFactFrom. Addinga new action, type Selection, Select in field, Field DatumFaktaFrom and search string

='*-' & Num(MinString(MånadNr), '00') & '-*'

Hope that helps.

Miguel

View solution in original post

7 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

What is the need of setting the values as selected, if both the columns are mapped.  The values are atutomatically filtered.

i.e., If you select Apr, the Possible values are all dates in that month.

If you want to get the count you can use the Count() like below

=Count(DISTINCT DateFactFrom)

Regards,

Jagan.

Not applicable
Author

Hi

I was not so good to descripe the problem. When I select the month april qw automatic select all post in DateFactFrom that in any why correspond to april, ongoing, started and ended.

But I would like to get the ones that have april as a startdate (and in a later step also how many that have a stop-date in the field DateFactTom) in april. As if I manually type/search for the *-04-* 

Hope you understand my problem(?)

This is what I now get when I select a specific month

qv1.JPG

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you please attach the qlikview file.

Regards,

Jagan.

Not applicable
Author

attached in the first post, thanks!

Not applicable
Author

Any thoughts?

Miguel_Angel_Baeyens

Hi,

There are a lot of posts in the forum, QlikViews and Docs on how to create a master calendar. You are analyzing two different dates, so only one calendar is not enough and will make very confusing the expressions in the charts. I'd create a new calendar for the date DateFactFrom in a table which fields will be shown in the sheet to allow users to do selections in either DateFactFrom or DateFactTom.

Anyway, you can go to the Settings menu, Document Properties, Triggers, select Field Event Triggers so when you select or change the selection in a field Year or Month, this selection is passed on to the field DateFactFrom. Addinga new action, type Selection, Select in field, Field DatumFaktaFrom and search string

='*-' & Num(MinString(MånadNr), '00') & '-*'

Hope that helps.

Miguel

Not applicable
Author

thanks. than I have to look into how to create multiple calendars