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: 
Not applicable

Need help on YTD display!!

Hi,

I had a requirement to display the previous years LTCR cases alongwith Last Yr and Current year YTD in a single graph. Though I was able to achieve this but problem now is when I make an year selection all the bars still display for all other years whereas I would just like to see the selected year bar to be displayed.

I have attached an example file.

Looking for some immediate help!!

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Try changing the expression to:

=IF(Year=$(vCYear)&' '&'YTD' or Year=$(vLYear)&' '&'YTD',(sum(LOST_TIME_CASE)*200000)/sum(HOURS_WORKED),if (only(Year), (sum({$<Year= , Quarter= ,[Month Name]= >}LOST_TIME_CASE)*200000)/sum({$<Year= , Quarter= ,[Month Name]= >}HOURS_WORKED)))

Regards,

Gordon

View solution in original post

2 Replies
Not applicable
Author

Try changing the expression to:

=IF(Year=$(vCYear)&' '&'YTD' or Year=$(vLYear)&' '&'YTD',(sum(LOST_TIME_CASE)*200000)/sum(HOURS_WORKED),if (only(Year), (sum({$<Year= , Quarter= ,[Month Name]= >}LOST_TIME_CASE)*200000)/sum({$<Year= , Quarter= ,[Month Name]= >}HOURS_WORKED)))

Regards,

Gordon

Not applicable
Author

Thanks a lot Jordon!! You are awesome...