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

Set Analysis

Hi,

I am having a data of 2006,2007,2008 3 years data using an expression For PYTD 

Sum({$<OrderDate = {">=$(=YearStart(AddMonths(Max(OrderDate),-12))) <=$(=AddMonths(Max(OrderDate),-12))"}>}Sales)

which is working fine and  giving me total sales of 2007 year. But when i am selecting year 2007 in my year filter. 

This is expression is giving me 0.

If I am using following expression

Sum({$<Year =, OrderDate = {">=$(=YearStart(AddMonths(Max(OrderDate),-12)))<=$(=AddMonths(Max(OrderDate),-12))"}>}Sales)

Then it is working fine for my year filter. 

May anybody tell me what is the difference in those 2 expressions & why is data coming 0 for my first expression which i mentioned.

 

Regards.

3 Replies
pradosh_thakur
Master II
Master II

 

Sum({$<Year =, OrderDate = {">=$(=YearStart(AddMonths(Max(OrderDate),-12)))<=$(=AddMonths(Max(OrderDate),-12))"}>}Sales)

The "Year= " nullify any selection made on the year so year doesn't affect your expression any more. Where as the associated value are there and your max order date is somewhere in 2007 and you get the data for 2006 with the help of " orderdate ={">=  .... "} " expression.

 

Thanks

Pradosh

 

Learning never stops.
Sue_Macaluso
Community Manager
Community Manager

Hi, Is this for QlikView or Sense? Id like to move it into the correct product forum.
Sue Macaluso
pallvit_01
Contributor II
Contributor II
Author

Hi, 

I am Using same expression in both QlikSene and QlikView.

 

Best Regards.

Pallvit Pratap