Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
alessandro
Contributor III
Contributor III

Date only year 2019

Hi to all.

I would like to insert in a box a field 'date' and to have only the year 2019 (or to specific date).

I tried to insert it like dimension in this way

= Date (MonthStart (ContractCommenceDate), 'YYYY')>= 2019

but is wrong.

Is there someone that give me some advise.

Thanks to all those who want to intervene

I'm sorry, if I wrong "select location".

ciao

ale

1 Solution

Accepted Solutions
Anil_Babu_Samineni

I don't know if I understand correctly, But check

(If(Year(ContractCommenceDate)=2019, 1, 0)) 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

May be?

If(Year(ContractCommenceDate)=2019, ContractCommenceDate)

Or

Only({<ContractCommenceDate={"$(=Year(ContractCommenceDate)=2019)"}>} ContractCommenceDate)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
alessandro
Contributor III
Contributor III
Author

Hi Anil and thanks for your reply.

Your first solution

(If(Year(ContractCommenceDate)=2019, ContractCommenceDate)) 

is ok but as resulting I have a list of dates, while I would like to have a kind of switc (0-1) so that I could push only one thing, while now I have to push "selection all". But it's the same, but...And besides, it seems to me that the qvd has become slower.

While your second solution, unfortunatly, go in error.

Anyway, thanks a lot.

ciao

ale

Anil_Babu_Samineni

I don't know if I understand correctly, But check

(If(Year(ContractCommenceDate)=2019, 1, 0)) 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful