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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
usr1
Contributor II
Contributor II

If statement with date custom dimension

Hi all,

I have created a custom dimension that is being used as a filter:

=Year([Date])

 The options in this filter are 2022, 2021, etc. 

I would like to use the results of the selections in KPI. For example

If( Year[Date] = 2022, 10, 5) 

 

Thanks! 

Labels (2)
3 Replies
rwunderlich
MVP
MVP

Can you use your expression as written (with parens added)

If( Year([Date]) = 2022, 10, 5) 

 

usr1
Contributor II
Contributor II
Author

Unfortunately that does not work in that format

vinieme12
Champion III
Champion III

As below 

=If( Year(max([Date])) = 2022, 10, 5)

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.