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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
iczkla
Contributor III
Contributor III

Dimension displaying only current year's weeks on the chart

Hello,

I have a dataset summarising employee terminations over the last few months. On one chart I want to choose Termination number over the weeks, however I only want current year's weeks to be displayed. Is there an expression I can use in dimension to achieve this?

Week(TerminationDate) returns data for all weeks in the dataset

I've tried 

=week([Termination Date])> (Year(Today())) 

but it doesn't show all weeks, just retrieves one value.

I am completely new to this, so any help would be greatly appreciated.

1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi Iczkla,

You have two options, do it at the dimension. Suppress zero values with this.

IF( Year( [Termination Date] ) = Year( Today() ),
      Week( [Termination Date] ),
      null()
)

.

 Or do it with the measure with set analysis.

Count( {$< [Termination Date]) = {">=YearStart( Today() ) and <=YearEnd( Today() )"}  >} Terminations) 

Jordy

Climber

Work smarter, not harder