Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

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


Capture.PNG

View solution in original post

11 Replies
sunny_talwar

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)

Anonymous
Not applicable
Author

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

I tryed both your answers and it didn't work

sunny_talwar

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

Anonymous
Not applicable
Author

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

sunny_talwar

Mocked up data which resembles the original scenario?

Anonymous
Not applicable
Author

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?

Anonymous
Not applicable
Author

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

shared a document, can you open it?

sunny_talwar

Would you be able to attach something here?

Uploading a Sample

Anonymous
Not applicable
Author

here it is!