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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help in set analysis

Hello Friends,

I have used the following expression to find the last year sales with the mode of transport is 'Road'

=If([Type]='Road',Sum({$<ShipmentYear={$(=Year(Today())-1)}>} Sales)),

2. and also the TYPE may be dynamic based on selection it has to show the last year sales.

Regards

Chriss

7 Replies
Not applicable
Author

Hi Chris,

Whats The Output You Have?

Try This =If([Type]=Road,Sum({$<ShipmentYear={$(=ShipmentYear(Today())-1)}>} Sales))

Can You Please Share Your test app with me.

Thanks & Regards,

Nirmal.

Not applicable
Author

Hello Nirmal,

There is no output is coming for the expression but there is no error is showing on the expression.

I don't know where I am making a mistake, could you please tell me how to proceed further.

Reards

Chriss

Not applicable
Author

Are You use the Below expression.

=If([Type]=Road,Sum({$<ShipmentYear={$(=ShipmentYear(Today())-1)}>} Sales))

Not applicable
Author

Hello Nirmal,

The same is used by me, there is no result...

Regards

Chriss

Not applicable
Author

Hi

create one variable for last year like

vyear=year(today())-1

sum({<type={'road'},ShipmentYear={">=$(vyear)"}>}sales)

use it

Not applicable
Author

create one variable for last year like

vyear=year(today())-1

if(type=Road,sum({$<ShipmentYear={"<=$(vyear)>"}>}sales))

use it

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this

=Sum({<[Type]={'Road'},ShipmentYear={$(=Year(Today())-1)}>} Sales)

OR

=Sum({<[Type]={'Road'},ShipmentYear={$(=Year(AddYears(Today(),-1))}>} Sales)

Hope it helps