Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
miguelcunha
Contributor

Expression Editor- Sum where date >=

Hey guys,

I'm trying to do the following sum:

SUM({<Date_last_y={">=$(Open_Date)"} >}Sale_Value)

Basically I want to sum Sale_Vaule where Data_last_y is greater or equal than Open_Date.

This is not working with my previously shown code.

Can you help me?

Thanks,

Miguel Cunha

1 Solution

Accepted Solutions
Highlighted

Re: Expression Editor- Sum where date >=

Try this

Sum(If(Date_last_y >= Open_Date, Sale_Value))


Capture.PNG

View solution in original post

11 Replies
Highlighted

Re: Expression Editor- Sum where date >=

Is there only One Open_Date? May be this

SUM({<Date_last_y={">=$(=Open_Date)"} >}Sale_Value)

or

SUM({<Date_last_y={">=$(=$(Open_Date))"} >}Sale_Value)

Highlighted
miguelcunha
Contributor

Re: Expression Editor- Sum where date >=

Open_Date is the store's opening day from my Stores Dimension

I tryed both your answers and it didn't work

Highlighted

Re: Expression Editor- Sum where date >=

I think you might need to use Aggr() function here... but difficult to say... would you be able to share a sample?

Highlighted
miguelcunha
Contributor

Re: Expression Editor- Sum where date >=

Unfortunately i cannot share a sample once this is my company data and confidencial information.

But basically I have a fact table with my sales like this:

Store_Code, Sales_Date,Sale_Value, Date_last_y

Date_last_y is the exact week day from the previous year.

Then I have my Store dimension with

Highlighted

Re: Expression Editor- Sum where date >=

Mocked up data which resembles the original scenario?

Highlighted
miguelcunha
Contributor

Re: Expression Editor- Sum where date >=

Unfortunately i cannot share a sample once this is my company data and confidencial information.

But basically I have a fact table with my sales like this:

Store_Code, Sales_Date,Sale_Value, Date_last_y

Date_last_y is the exact week day from the previous year.

Then I have my Store dimension with:
Store_code, Store_name, Company, Open_Date

Is this helpful?

Highlighted
miguelcunha
Contributor

Re: Expression Editor- Sum where date >=

https://pt.scribd.com/document/367691051/Qlik-Question

shared a document, can you open it?

Highlighted

Re: Expression Editor- Sum where date >=

Would you be able to attach something here?

Uploading a Sample

Highlighted
miguelcunha
Contributor

Re: Expression Editor- Sum where date >=

here it is!