Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Get Sales for the date campaign Launched

I am trying to output the sales for the date that the campaign launched. I don't want sales for any other day.

Date:              Campaign:         Sales:

01/01/18        Campaign 1      $18,000

01/01/19        Campaign 1      $17,500

01/01/20        Campaign 2      $16,000

01/01/21        Campaign 2     $19,000

The date launched for Campaign 2 was launched on the 20th therefore the output should be $16,000

I tried using the min() and max(function) but that only works if its at the beginning of the week or at the end of the week it doesnt solve if the campaign launched in the middle of the week. 

Thats why i want to pull only the date the campaign launched on.

Not sure what other functions are out there that I can use to solve his problem. I am using set analysis.

Can someone please help me? I am new to qlik.

Labels (4)
1 Solution

Accepted Solutions
Partner
Partner

 

clipboard_image_0.png

=sum(Sales) * (Date=Min(total <Campaign> Date))*-1

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

4 Replies
Partner
Partner

 

clipboard_image_0.png

=sum(Sales) * (Date=Min(total <Campaign> Date))*-1

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Contributor III
Contributor III

It worked!! Thank you!

Contributor III
Contributor III

Can you please explain the logic behind this expression? I don't quite understand how it works. 

Thanks.

Partner
Partner

=sum(Sales)  //tour calculation

*

(Date=Min(total <Campaign> Date)) // return -1 if true 0 if false

*-1 // multiply with -1 to reverse the impact of true above. -1 x -1= 1

Plees ekskuse my Swenglish and or Norweglish spelling misstakes