Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression dependent on Year part of TimeStamp?

Hi,

So I have some items with dates and I want to make a graph that displays the  items depending on the year that they were published. So, for example I want to show all the items that were published in 2013. So I tried using:

count({<Year(CLOSE_DATE) = 2013>}ID)

But this doesn't work.

Any help?

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP


Hi,

     Better you create a field in your script.

     Something like below.

     Load *,Year(CLOSE_DATE) as Year from XYZ;

     Then you can use the below expression.

     Count({<Year = {"2013"}>}ID)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
Not applicable
Author

Hi Beth,

In set analysis, you can't use calculated dimension (like Year(CLOSE_DATE)). To show all the items that were published in 2013, try with this expression :

Count({$<CLOSE_DATE = {">=$(=MakeDate(2013,01,01))"}>} ID)

Hope it helps.

Regards,

Nicolas

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP


Hi,

     Better you create a field in your script.

     Something like below.

     Load *,Year(CLOSE_DATE) as Year from XYZ;

     Then you can use the below expression.

     Count({<Year = {"2013"}>}ID)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks this worked