Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Weekly and YTD charts on the same view.

Hello,

I need to display a weekly sales and a year to date charts on the same view. In the weekly sales chart I always display one week at a time, but the ytd chart should always show the ytd sales regardless of the chosen week. Any ideas on how to implement this? thanks.

1 Solution

Accepted Solutions
Not applicable
Author

 

We can use set analysis or by using conditional flags

 

  • sum({1<Year={vCurrentYear}>}  [ytd sales])

           1 in above expression will use full set of data disregarding user selections. 

  • sum ([ytd sales]* _CYTD_Flag)

           For above expression to work, you need to have flags on date dimension created during document  load. In our case _CYTD_Flag refers to all days in current year until today.

 

    

 

View solution in original post

2 Replies
Not applicable
Author

 

We can use set analysis or by using conditional flags

 

  • sum({1<Year={vCurrentYear}>}  [ytd sales])

           1 in above expression will use full set of data disregarding user selections. 

  • sum ([ytd sales]* _CYTD_Flag)

           For above expression to work, you need to have flags on date dimension created during document  load. In our case _CYTD_Flag refers to all days in current year until today.

 

    

 

Anonymous
Not applicable
Author

Thank you. I did some changes using your guidelines and it works